fix: always set new web3 providers despite one being previously set
feat: separate eth wallet names
This commit is contained in:
parent
c94d767f0b
commit
4af07a3609
4 changed files with 12 additions and 10 deletions
|
|
@ -11,7 +11,6 @@ const pify = require('pify')
|
|||
const BN = require('../../../bn')
|
||||
const ABI = require('../../tokens')
|
||||
|
||||
const NAME = 'geth'
|
||||
exports.SUPPORTED_MODULES = ['wallet']
|
||||
|
||||
const paymentPrefixPath = "m/44'/60'/0'/0'"
|
||||
|
|
@ -19,7 +18,6 @@ const defaultPrefixPath = "m/44'/60'/1'/0'"
|
|||
let lastUsedNonces = {}
|
||||
|
||||
module.exports = {
|
||||
NAME,
|
||||
balance,
|
||||
sendCoins,
|
||||
newAddress,
|
||||
|
|
@ -35,9 +33,7 @@ module.exports = {
|
|||
}
|
||||
|
||||
function connect (url) {
|
||||
if (!web3.isConnected()) {
|
||||
web3.setProvider(new web3.providers.HttpProvider(url))
|
||||
}
|
||||
return web3.setProvider(new web3.providers.HttpProvider(url))
|
||||
}
|
||||
|
||||
const hex = bigNum => '0x' + bigNum.integerValue(BN.ROUND_DOWN).toString(16)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue