fix: force balance to big number
This commit is contained in:
parent
2e9e207486
commit
19c257f262
1 changed files with 1 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ function _balance (settings, cryptoCode) {
|
||||||
return fetchWallet(settings, cryptoCode)
|
return fetchWallet(settings, cryptoCode)
|
||||||
.then(r => r.wallet.balance(r.account, cryptoCode, settings, r.operatorId))
|
.then(r => r.wallet.balance(r.account, cryptoCode, settings, r.operatorId))
|
||||||
.then(balance => Promise.all([balance, getOpenBatchCryptoValue(cryptoCode)]))
|
.then(balance => Promise.all([balance, getOpenBatchCryptoValue(cryptoCode)]))
|
||||||
.then(([balance, reservedBalance]) => ({ balance: balance.minus(reservedBalance), reservedBalance, timestamp: Date.now() }))
|
.then(([balance, reservedBalance]) => ({ balance: BN(balance).minus(reservedBalance), reservedBalance, timestamp: Date.now() }))
|
||||||
.then(r => {
|
.then(r => {
|
||||||
lastBalance[cryptoCode] = r
|
lastBalance[cryptoCode] = r
|
||||||
return r
|
return r
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue