Git Product home page Git Product logo

minter-console-web's Introduction

Minter Console Website

Build Status License: MIT

This is the repository containing the code for the official Minter Console website console.minter.network

Install

  • clone the repo
  • ensure latest stable Node.js and NPM are installed
  • install node_modules npm ci
  • copy .env.master cp .env.master .env
  • set correct .env variables
  • build npm run production
  • now you have static assets in the ./dist/ folder, you have to distribute them with some web server like Nginx (or run npm run start, but it's not recommended for production)

Deployment script

Build in Nuxt SPA mode

npm ci && npm run production

Root folder: ./dist/

Nuxt build cheatsheet

# install dependencies
$ npm install # Or yarn install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm start

# generate static project
$ npm run generate

For detailed explanation on how things work, checkout the Nuxt.js docs.

minter-console-web's People

Contributors

danil-lashin avatar danzybee avatar masquel avatar shrpne avatar tazhate avatar vmalyavin avatar whitesunset avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minter-console-web's Issues

import {ROUTES, USER_MNEMONIC} from '~/test/variables';

/**

  • @param {Page} page
  • @return {Promise}
    */
    export async function logout(page) {
    await new Promise((resolve) => {
    setTimeout(resolve, 100);
    });
    await page.waitForSelector('[data-test-id="headerLogoutButton"]');
    await page.click('[data-test-id="headerLogoutButton"]');
    await page.waitForSelector('[data-test-id="authSection"]');
    }

/**

  • @param {Page} page
  • @return {Promise}
    */
    export async function login(page) {
    try {
    await page.goto(ROUTES.public.index);
    await page.waitForSelector('[data-test-id="authSection"]');
    await page.type('[data-test-id="authAdvancedLoginInputMnemonic"]', USER_MNEMONIC);
    await page.click('[data-test-id="authAdvancedLoginSubmitButton"]');
    await page.waitForSelector('[data-test-id="walletAddressLink"]');
    } catch (e) {
    const html = await page.evaluate(() => document.documentElement.outerHTML);
    console.log(html);
    throw e;
    }
    }

/**
*

  • @param {Page} page

  • @param {string} formTestId

  • @param {boolean|'estimation'} [shouldFailPost]

  • @param {boolean} [shouldFailModal]

  • @return {Promise}
    */
    export async function txSubmit(page, formTestId, {shouldFailPost, shouldFailModal} = {}) {
    await page.waitForSelector([data-test-id="${formTestId}"] [data-test-id="txSubmitButton"]:not(.is-disabled));
    await wait();

    // submit (opens modal)
    await page.click([data-test-id="${formTestId}"] [data-test-id="txSubmitButton"]);

    const modalButtonSelector = [data-test-id="${formTestId}"] [data-test-id="txModalSubmitButton"];
    if (!shouldFailModal) {
    // wait for modal
    await page.waitForSelector(modalButtonSelector);
    // post tx
    await page.click(modalButtonSelector);
    } else {
    await waitForNoSelector(page, modalButtonSelector);
    }

    if (!shouldFailPost) {
    // wait for success modal
    await page.waitForSelector([data-test-id="${formTestId}"] [data-test-id="txModalSuccessClose"]);
    // close modal
    await page.click([data-test-id="${formTestId}"] [data-test-id="txModalSuccessClose"]);
    } else if (shouldFailPost === 'estimation') {
    // wait for error
    await page.waitForSelector([data-test-id="${formTestId}"] [data-test-id="estimationError"], {timeout: 1020000});
    } else {
    // wait for error
    await page.waitForSelector([data-test-id="${formTestId}"] [data-test-id="txErrorMessage"]);
    }
    }

/**

  • @param {number} [time=100]
  • @return {Promise}
    */
    export function wait(time = 100) {
    return new Promise((resolve) => {
    setTimeout(resolve, time);
    });
    }

/**
*

  • @param {Page} page

  • @param {string} selector

  • @param [options]

  • @return {Promise}
    */
    export function waitForNoSelector(page, selector, options) {
    const foundMessage = Selector ${selector} found but should not;

    return page.waitForSelector(selector, {timeout: 5000, ...options})
    .then(() => {
    throw new Error(foundMessage);
    })
    .catch((error) => {
    if (error.message === foundMessage) {
    throw error;
    } else {
    return 'OK';
    }
    });
    }

Change port

Make it possible to change listening port, something like this:
minter-console-0.3.0-portable-x64.exe -port 8000

Port 4000 is busy on my machine by svchost.exe

Неполная русская раскладка

русской раскладке консоли , в разделе создание монет , по русски отображается только раздел "создание монет" , остальные разделы на английском

unencrypted seed phrases in leveldb file

Tested version: minter-console-0.6.2-portable-x64.exe
All seed phrases, which have been submitted in the login form are stored unencrypted in the following plain text file: <windows_drive>\Users<username>\AppData\Roaming\minter-console-web\Local Storage\leveldb\000003
Seed phrases are accumulated in this file and moreover are not being cleared after logging out.
This is a very critical vulnerability, which confuse users, as they think, the solution from minter team is secure.

Unpriveleged user namespace clone

Hi guys,
I'd better write in English just to be clear for those who don't speak Russian, hope you don't mind.

Not sure whether it's a bug or INTENTIONAL but...
There is an issue with current Minter Console Appimage which is related to security settings used by default in such distros as Arch Linux and its derivatives like Manjaro. I'm talking about unprivileged_userns_clone kernel setting which is set to zero by default in order to mitigate potential security issues. The latest Minter Console (v. 0.5.0) requires this setting to be 1 to work fine, the previous one (v. 0.4.1) has no problems with the default setting 0.

$ ./minter-console-0.5.0-x86_64_d094b8e27a6a26c34083684f238bd241.appimage
[11340:0720/224901.040160:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_minterMqJgwV/chrome-sandbox is owned by root and has mode 4755.
fish: “./minter-console-0.5.0-x86_64_d…” terminated by signal SIGTRAP (Trace or breakpoint trap)

I had a talk on this in @MinterDevChat with someone who assured me there's no such issue on his Fedora installation, I've checked on Ubuntu (it turned out they have unprivileged_userns_clone set to 1 - don't know how they both mitigate potential risks). openSUSE also has no problem in launching this version of Console (however no idea how it mitigates the risk either). So from what I can see now, Arch-based distros are affected by this.
The thing is, there is no valid reason for an appimage to demand me changing my kernel configuration, especially if I am running the stock configuration of my distribution. I believe that there should be no reason to lower the security settings of the kernel as a workaround.

Snap version works fine (probably because of unprivileged_userns_apparmor_policy set to 1, but that's OK since snap applications have no access to system's root).

Небольшой патч который позволит автоматически заполнять из query поля address, amount и message в форме отправки монет

Index: components/CoinSendForm.vue
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- components/CoinSendForm.vue	(revision b9166737e8d23b7ef75ceda49ab854cf236f306d)
+++ components/CoinSendForm.vue	(date 1560354470000)
@@ -18,6 +18,12 @@
     import InputUppercase from '~/components/common/InputUppercase';
     import ButtonCopyIcon from '~/components/common/ButtonCopyIcon';
     import Modal from '~/components/common/Modal';
+    import url from 'url';
+    import qs from 'qs';
+
+
+    const queryParams = qs.parse(url.parse(document.location.href).query);
+
 
     export default {
         components: {
@@ -43,8 +49,8 @@
                 serverSuccess: '',
                 form: {
                     nonce: '',
-                    address: '',
-                    amount: null,
+                    address: queryParams.address ? queryParams.address : '',
+                    amount: queryParams.amount ? queryParams.amount : null,
                     coinSymbol: coinList && coinList.length ? coinList[0].coin : '',
                     feeCoinSymbol: '',
                     message: '',
@@ -52,7 +58,7 @@
                 },
                 formAdvanced: {
                     feeCoinSymbol: '',
-                    message: '',
+                    message: queryParams.message ? queryParams.message : '',
                 },
                 isModeAdvanced: false,
                 isConfirmModalVisible: false,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.