add Infura wallet support
This commit is contained in:
parent
05e7889dc0
commit
ac89f0e5e9
9 changed files with 472 additions and 513 deletions
|
|
@ -34,9 +34,11 @@ function fetchWallet (settings, cryptoCode) {
|
|||
const masterSeed = Buffer.from(hex.trim(), 'hex')
|
||||
const plugin = configManager.cryptoScoped(cryptoCode, settings.config).wallet
|
||||
const wallet = ph.load(ph.WALLET, plugin)
|
||||
const account = settings.accounts[plugin]
|
||||
const rawAccount = settings.accounts[plugin]
|
||||
const account = _.set('seed', computeSeed(masterSeed), rawAccount)
|
||||
if (_.isFunction(wallet.run)) wallet.run(account)
|
||||
|
||||
return {wallet, account: _.set('seed', computeSeed(masterSeed), account)}
|
||||
return {wallet, account}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue