Giter VIP home page Giter VIP logo

eostoolkit's Introduction

Quick start

  1. Clone this repo
  2. Move to the appropriate directory: cd eostoolkit.
  3. Run yarn in order to install dependencies and clean the git repo. At this point you can run npm start to see the example app at http://localhost:3000.
  4. Run yarn run format:js prior to making commits for nice clean code
  5. Run npm run build to build the deployable package.

Now you're ready to rumble!

eostoolkit's People

Contributors

7rulnik avatar andre-ctd avatar benjaminlgt-littlelives avatar chaintng avatar datapimp avatar dattaya avatar deniscarriere avatar dev24 avatar genereosaus avatar gihrig avatar glennreyes avatar grabbou avatar greenkeeperio-bot avatar jbinto avatar justingreenberg avatar jwinn avatar khazius avatar kindasloth avatar lucaspaulodev avatar mxstbr avatar nekr avatar okonet avatar oliverturner avatar philihp avatar ralfweinand avatar rog avatar samit4me avatar sedubois avatar somus avatar sun1211 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  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  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  avatar  avatar  avatar  avatar  avatar

eostoolkit's Issues

FR: Trezor support

It would be amazing if Trezor could be used to sign transactions generated by EOS Toolkit.

Implement i18n support

We want to make the eostoolkit accessible to as many people in the EOS world as possible.
We therefore will implement the i18n standard to support multiple languages.

Build fails

ERROR in main.5af609b4ad8c2408683c.js from UglifyJs
Unexpected token name «o», expected punc «;» [main.5af609b4ad8c2408683c.js:37,266476]

Move Blockone into components folder

Enhancement

The new Blockone component is sitting within the containers. However it is a presentational component and should be located under components

MultiSig::Sign feature does not seem to work

Been trying out the SingleSig & MultiSig mode.

Here's a very easy example that I'm trying to accomplish .

Transaction:

[
  {
    "account": "eosio.token",
    "name": "transfer",
    "data": {
      "from": "deniscarrier",
      "to": "eosnationexp",
      "memo": "",
      "quantity": "0.0001 EOS"
    }
  }
]

Using deniscarrier@active as the authority

image

This section works

tx-deniscarrier-1534524354987.json.zip

image

When I go to sign the transaction:

{
  "expiration": "2018-08-17T17:45:54",
  "ref_block_num": 23856,
  "ref_block_prefix": 1460912772,
  "net_usage_words": 0,
  "max_cpu_usage_ms": 0,
  "delay_sec": 0,
  "context_free_actions": [],
  "actions": [
    {
      "account": "eosio.token",
      "name": "transfer",
      "authorization": [
        {
          "actor": "deniscarrier",
          "permission": "active"
        }
      ],
      "data": "7095bbd720eca64a50bb9ad465333155010000000000000004454f530000000000"
    }
  ],
  "transaction_extensions": []
}

The transaction fails

image

Console: Error message

code: 402
isError: true
message: "User rejected the signature request"
type : "signature_rejected"

The issue seems to be coming from somewhere in the signTransaction try/catch statement:

https://github.com/eostoolkit/eostoolkit/blob/6e90656286e7d9c6b77474bd8d6fad268f311a4e/app/containers/OfflineClient/saga.js

containers/OfflineClient/saga.js

export function* signTransaction(action) {
  yield put(loadingNotification());
  try {
    const networkReader = yield select(makeSelectReader());
    const signer = yield select(makeSelectSigner());
    const identity = yield select(makeSelectIdentity());
    const network = yield select(makeSelectActiveNetwork());

    if(!networkReader || !signer || !identity) {
      throw { message: 'Require network connection and identity'}
    }

    //sign a transaction json
    const chainId = network.network.chainId;
    const transaction = JSON.parse(action.data.transaction);
    const chainIdBuf = Buffer.from(chainId,'hex');
    const packedContextFreeData = Buffer.from(new Uint8Array(32)) // TODO
    let buf = networkReader.fc.toBuffer('transaction',transaction);
    let signBuf = Buffer.concat([chainIdBuf, buf, packedContextFreeData]);
    let signature = yield signer.getArbitrarySignature(identity.publicKey,signBuf,'Offline signing of multisig action',false);


    const data = JSON.stringify(signature, null, 2);
    const filename = `signature-${identity.name}-${(new Date()).getTime()}.json`;

    fileDownload(data,filename,'application/json');
    yield put(successNotification(signature));

  } catch (err) {
    console.error('An EOSToolkit error occured - see details below:');
    console.error(err);
    yield put(failureNotification(err));
  }
}

Mobile Browser detected

Since Scatter cannot be used on mobile, we should be able to detect a mobile browser and only shows tools that can be used without scatter. There should also be an explanation saying that the other tools are available but a desktop computer is needed.

JS assets not minified/uglified

Issue

JS assets do have a cache busting strategy, but most of them are neither minified nor uglified. Which dramatically increases the asset size, therefore page load.

Fix

Look into Webpack libraries in order to fix this

Packages out of date, build process too complex.

Trying to build. All of your packages are way out of date.

added 2101 packages from 1030 contributors and audited 43850 packages in 60.759s
found 796 vulnerabilities (155 low, 633 moderate, 8 high)

Why is this build process so overly complex? Why not just a normal webpack project? You have all these scripts that seem unnecessary.

update this:
we recommend using babel-preset-env now: please read babeljs.io/env to update

I updated the packages and I get this:

Building the Webpack DLL...
Hash: ef12216129b67904c9f5
Version: webpack 4.34.0
Time: 12832ms
Built at: 06/18/2019 9:36:34 PM
1 asset
Entrypoint reactBoilerplateDeps = reactBoilerplateDeps.dll.js
chunk {0} reactBoilerplateDeps.dll.js (reactBoilerplateDeps) 12.3 MiB [entry] [rendered]

WARNING in ./node_modules/uglifyjs-webpack-plugin/dist/worker.js 12:130-137
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
@ ./node_modules/uglifyjs-webpack-plugin/dist/TaskRunner.js
@ ./node_modules/uglifyjs-webpack-plugin/dist/index.js
@ ./node_modules/uglifyjs-webpack-plugin/dist/cjs.js
@ dll reactBoilerplateDeps

WARNING in ./node_modules/uglify-js/tools/node.js 17:11-32
Critical dependency: the request of a dependency is an expression
@ ./node_modules/uglifyjs-webpack-plugin/dist/minify.js
@ ./node_modules/uglifyjs-webpack-plugin/dist/worker.js
@ ./node_modules/uglifyjs-webpack-plugin/dist/TaskRunner.js
@ ./node_modules/uglifyjs-webpack-plugin/dist/index.js
@ ./node_modules/uglifyjs-webpack-plugin/dist/cjs.js
@ dll reactBoilerplateDeps

WARNING in ./node_modules/worker-farm/lib/child/index.js 53:33-53
Critical dependency: the request of a dependency is an expression
@ ./node_modules/worker-farm/lib/fork.js
@ ./node_modules/worker-farm/lib/farm.js
@ ./node_modules/worker-farm/lib/index.js
@ ./node_modules/uglifyjs-webpack-plugin/dist/TaskRunner.js
@ ./node_modules/uglifyjs-webpack-plugin/dist/index.js
@ ./node_modules/uglifyjs-webpack-plugin/dist/cjs.js
@ dll reactBoilerplateDeps

WARNING in ./node_modules/uglifyjs-webpack-plugin/dist/index.js
Module not found: Error: Can't resolve 'json-loader' in '/home/steve/Documents/GitHub/aikon/eostoolkit'
@ ./node_modules/uglifyjs-webpack-plugin/dist/index.js
@ ./node_modules/uglifyjs-webpack-plugin/dist/cjs.js
@ dll reactBoilerplateDeps

WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/

ERROR in ./node_modules/eosjs/dist/eosjs-api.js
Module not found: Error: Can't resolve 'json-loader' in '/home/steve/Documents/GitHub/aikon/eostoolkit'
@ ./node_modules/eosjs/dist/eosjs-api.js 94:21-59
@ ./node_modules/eosjs/dist/index.js
@ dll reactBoilerplateDeps

ERROR in ./node_modules/eosjs/dist/eosjs-api.js
Module not found: Error: Can't resolve 'json-loader' in '/home/steve/Documents/GitHub/aikon/eostoolkit'
@ ./node_modules/eosjs/dist/eosjs-api.js 93:13-43
@ ./node_modules/eosjs/dist/index.js
@ dll reactBoilerplateDeps

Tried to update everything to modern JS, but couldn't figure out the redux stuff. Please update the project. Thanks.

Missing Prettier Editor configuration

Prettier Editor configuration not working properly

VSCode/Atom Prettier integration are not formatting the code properly

Fix

Add prettier-eslint to the repo

Remember network settings

Currently, when you change the network it only stays in the selected network until you reload the page (which is often necessary to refresh some data), then you need to go back to change the network.
Please implement support for deep-linking the network selection. Something like:

https://eostoolkit.io?network=Telos&Type=Mainnet&API=CalEOS


Later we can further improve this, so that if a user comes to URL:
https://eostoolkit.io?network=Telos
we filter the networks to only show API nodes for this network (and we select one default for them).

Name bidding

Name bidding functionality must be added.
A button should be included that finds the current price, and sets a price +10% automatically.

npm install fails

Just a a few of the errors: i'm on Linux if that matters:

ERROR in ./node_modules/babel-core/lib/api/node.js
Module not found: Error: Can't resolve '../../package' in '/home/steve/Documents/GitHub/aikon/eostoolkit/node_modules/babel-core/lib/api'
@ ./node_modules/babel-core/lib/api/node.js 60:15-39
@ ./node_modules/babel-core/index.js
@ dll reactBoilerplateDeps

ERROR in ./node_modules/core-js-compat/get-modules-list-for-target-version.js
Module not found: Error: Can't resolve './modules-by-versions' in '/home/steve/Documents/GitHub/aikon/eostoolkit/node_modules/core-js-compat'
@ ./node_modules/core-js-compat/get-modules-list-for-target-version.js 3:26-58
@ ./node_modules/@babel/preset-env/lib/polyfills/corejs3/entry-plugin.js
@ ./node_modules/@babel/preset-env/lib/index.js
@ dll reactBoilerplateDeps

ERROR in ./node_modules/@babel/plugin-proposal-async-generator-functions/lib/index.js
Module not found: Error: Can't resolve '@babel/core' in '/home/steve/Documents/GitHub/aikon/eostoolkit/node_modules/@babel/plugin-proposal-async-generator-functions/lib'
@ ./node_modules/@babel/plugin-proposal-async-generator-functions/lib/index.js 39:15-37
@ ./node_modules/@babel/preset-env/lib/available-plugins.js
@ ./node_modules/@babel/preset-env/lib/index.js
@ dll reactBoilerplateDeps

ERROR in ./node_modules/@babel/plugin-proposal-async-generator-functions/lib/for-await.js
Module not found: Error: Can't resolve '@babel/core' in '/home/steve/Documents/GitHub/aikon/eostoolkit/node_modules/@babel/plugin-proposal-async-generator-functions/lib'
@ ./node_modules/@babel/plugin-proposal-async-generator-functions/lib/for-await.js 9:15-37
@ ./node_modules/@babel/plugin-proposal-async-generator-functions/lib/index.js
@ ./node_modules/@babel/preset-env/lib/available-plugins.js
@ ./node_modules/@babel/preset-env/lib/index.js
@ dll reactBoilerplateDeps

ERROR in ./node_modules/@babel/plugin-proposal-object-rest-spread/lib/index.js
Module not found: Error: Can't resolve '@babel/core' in '/home/steve/Documents/GitHub/aikon/eostoolkit/node_modules/@babel/plugin-proposal-object-rest-spread/lib'
@ ./node_modules/@babel/plugin-proposal-object-rest-spread/lib/index.js 29:15-37
@ ./node_modules/@babel/preset-env/lib/available-plugins.js
@ ./node_modules/@babel/preset-env/lib/index.js
@ dll reactBoilerplateDeps

ERROR in ./node_modules/@babel/plugin-transform-async-to-generator/lib/index.js
Module not found: Error: Can't resolve '@babel/core' in '/home/steve/Documents/GitHub/aikon/eostoolkit/node_modules/@babel/plugin-transform-async-to-generator/lib'
@ ./node_modules/@babel/plugin-transform-async-to-generator/lib/index.js 39:15-37
@ ./node_modules/@babel/preset-env/lib/available-plugins.js
@ ./node_modules/@babel/preset-env/lib/index.js
@ dll reactBoilerplateDeps

ERROR in ./node_modules/@babel/plugin-transform-block-scoped-functions/lib/index.js
Module not found: Error: Can't resolve '@babel/core' in '/home/steve/Documents/GitHub/aikon/eostoolkit/node_modules/@babel/plugin-transform-block-scoped-functions/lib'
@ ./node_modules/@babel/plugin-transform-block-scoped-functions/lib/index.js 19:15-37
@ ./node_modules/@babel/preset-env/lib/available-plugins.js
@ ./node_modules/@babel/preset-env/lib/index.js
@ dll reactBoilerplateDeps

Add a manual language switcher

Currently the browser auto-detects the default language. Some users prefer to switch language manually via a drop-down or flag on the GUI.

Pressing Enter key when filling forms reload the page

Issue

Filling in a form and hitting the Enter key to expect form submission does not work. It actually reload the whole page.

Fix

e.preventDefault() is not actioned. We need to fix this across all forms in a generic manner

Simplify Networks UI

  1. The user should be able to select an EOSIO chain from a simple dropdown with just the network name and Icon instead of having to go to a separate "Networks" page and find the node he wants to connect to. Similar to below:

image

  1. The user should not need to know the 3 aspects of his Read/Write/Account but we should only show a "Loading" (maybe with an animation that fades the word in and out until finished and then shows "Connected" (with a green light).

image

GenerEOS pay for transactions

We need to support free transactions on eostoolkit (limitted to 5 per account). This is one of the main reasons people switch to other toolkits.

Details were discussed here:
EOSIO/eos#6332

Reduce saga code boilerplate

Enhancement

All the saga logic use the exact same boilerplate:

 const eosClient = yield select(EosClient());
  const form = yield select(Form());
  const eosAccount = yield select(EosAccount());
  yield put(loadingNotification());
   try {
       {ACTION_BODY_HERE}
       yield put(successNotification(res.transaction_id));
  } catch (err) {
       yield put(failureNotification(err));
  }

We should look into a way of reducing repeatable patterns

Generic solution to find available tokens & token balances for other EOSIO chains

For EOS mainnet we use eosflare to retrieve the list of tokens and greymass to get the token balances.

For Telos we have hard-coded a list of tokens here:
https://github.com/eostoolkit/eos-airdrops/blob/master/tokens.json

For other chains we don't support tokens at all... We need to find a more generic solution. Not sure if there is a simple generic way, or if we need to maintain a list of tokens (like we do for Telos - but it's outdated) or if there is someone else who maintains a list, or if we can just query dfuse or some other API?

Add Scatter/man-in-the-middle disclaimer

We should provide a disclaimer that we are an online application and that other applications may spoof us or provide man in the middle attacks.
Users should be warned on every page to carefully review their scatter parameters and link to a wiki on what normal parameters look like for common transactions.

Can't sign transaction with ledger

Issue Type

  • [ x ] Bug

Description

I need to sign transfer transaction requiring multiple signatures. I can easily sign if scatter keeps keys on it's own, but if the keys are on the ledger connected to scatter - signing is not working. Is there some workaround or something?

Steps to reproduce

  • Switch to multisig
  • Create transfer transaction
  • Go to https://eostoolkit.io/multisig/sign
  • Paste tx json
  • Click sign
  • Confirm on scatter
  • Scatter window disappears and nothing happens

Improve token summary view

Currently all tokens are bunched together up the top, which is hard to read. It would be better to arrange them in a tabular format which can be shown or hidden.

That tabular structure could then also eventually be further improved and buttons to claim or stage etc, directly built in there.

Add network switching

Users should see on every page with network (and chainid) they are currently connected to.
They should have the option of switching to a testnet.
Testnet switch should automatically log out scatter.

Improve error messages

The error message shows the full JSON message and a lot of users get confused by that. Would be better if we show a user friendly message and only the important bit of technical details (e.g. "Transaction expired" but without all the rest of the JSON.

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.