feat: add blockchain status getter to all daemons
This commit is contained in:
parent
75cb094476
commit
2819b8a519
11 changed files with 107 additions and 16 deletions
|
|
@ -123,6 +123,12 @@ function supportsBatching (cryptoCode) {
|
|||
.then(() => SUPPORTS_BATCHING)
|
||||
}
|
||||
|
||||
function checkBlockchainStatus (cryptoCode) {
|
||||
return checkCryptoCode(cryptoCode)
|
||||
.then(() => fetch('getblockchaininfo'))
|
||||
.then(res => !!res['initialblockdownload'] ? 'ready' : 'syncing')
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
balance,
|
||||
sendCoins,
|
||||
|
|
@ -130,5 +136,6 @@ module.exports = {
|
|||
getStatus,
|
||||
newFunding,
|
||||
cryptoNetwork,
|
||||
supportsBatching
|
||||
supportsBatching,
|
||||
checkBlockchainStatus
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue