feat: blockchain status checking no longer dependent on plugin status
This commit is contained in:
parent
3c33695b9d
commit
f23f31e4d9
4 changed files with 23 additions and 27 deletions
|
|
@ -228,6 +228,7 @@ function newFunding (account, cryptoCode, settings, operatorId) {
|
|||
|
||||
function checkBlockchainStatus (cryptoCode) {
|
||||
return checkCryptoCode(cryptoCode)
|
||||
.then(pify(web3.eth.isSyncing))
|
||||
.then(res => _.isObject(res) ? 'syncing' : 'ready')
|
||||
.then(() => connect(`http://localhost:${coins.utils.getCryptoCurrency(cryptoCode).defaultPort}`))
|
||||
.then(() => web3.eth.syncing)
|
||||
.then(res => res === false ? 'ready' : 'syncing')
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue