Merge pull request #1133 from chaotixkilla/fix-blockchain-installation

Remove plugin dependency from blockchain status checking
This commit is contained in:
Rafael Taranto 2022-03-01 12:11:00 +00:00 committed by GitHub
commit e6194e8d04
4 changed files with 23 additions and 27 deletions

View file

@ -229,6 +229,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')
}