-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Devop/get tokens #41
Devop/get tokens #41
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #41 +/- ##
==========================================
- Coverage 4% 3.83% -0.17%
==========================================
Files 377 410 +33
Lines 1625 1695 +70
Branches 107 102 -5
==========================================
Hits 65 65
- Misses 1551 1621 +70
Partials 9 9
Continue to review full report at Codecov.
|
d5bd40a
to
c3f2240
Compare
src/configs/networks/types/GO.js
Outdated
@@ -0,0 +1,12 @@ | |||
const tokens = require('../../../../tokens/tokens-go.json') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use @ path
src/App.vue
Outdated
const state = { | ||
web3: window.web3 ? window.web3.setProvider(this.$store.state.Networks['ETH'][0].url) : web3, | ||
web3: store.get('network') ? new Web3(new Web3.providers.HttpProvider(store.get('network').url)) : new Web3(new Web3.providers.HttpProvider(this.$store.state.Networks['ETH'][0].url)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not always httpProvider, sometimes it can be websocket as well. You can simply pass the url to the web3 and it will recognize
new Web3(store.get('network').url)
https://web3js.readthedocs.io/en/1.0/getting-started.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
to: web3.utils.toChecksumAddress(address), | ||
data: data | ||
}).then(res => unit.fromWei(web3.utils.toBN(res).toString(), 'ether')).catch(err => console.log(err)) | ||
}).then(res => { | ||
const tokenBalance = unit.fromWei(web3.utils.toBN(res).toString(), 'ether') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const tokenBalance = web3.utils.toBN(res).div(10^token.decimals)
4aad87d
to
69b569c
Compare
Devop