Merge pull request #1079 from naconner/monero-fix
fix: monero bn methods
This commit is contained in:
commit
20ba336997
1 changed files with 2 additions and 2 deletions
|
|
@ -92,7 +92,7 @@ function accountBalance (cryptoCode) {
|
||||||
.then(() => refreshWallet())
|
.then(() => refreshWallet())
|
||||||
.then(() => fetch('get_balance', { account_index: 0, address_indices: [0] }))
|
.then(() => fetch('get_balance', { account_index: 0, address_indices: [0] }))
|
||||||
.then(res => {
|
.then(res => {
|
||||||
return BN(res.unlocked_balance).shift(unitScale).round()
|
return BN(res.unlocked_balance).shiftedBy(unitScale).decimalPlaces(0)
|
||||||
})
|
})
|
||||||
.catch(err => handleError(err))
|
.catch(err => handleError(err))
|
||||||
}
|
}
|
||||||
|
|
@ -177,7 +177,7 @@ function newFunding (account, cryptoCode) {
|
||||||
fetch('create_address', { account_index: 0 })
|
fetch('create_address', { account_index: 0 })
|
||||||
]))
|
]))
|
||||||
.then(([balanceRes, addressRes]) => ({
|
.then(([balanceRes, addressRes]) => ({
|
||||||
fundingPendingBalance: BN(balanceRes.balance).sub(balanceRes.unlocked_balance),
|
fundingPendingBalance: BN(balanceRes.balance).minus(balanceRes.unlocked_balance),
|
||||||
fundingConfirmedBalance: BN(balanceRes.unlocked_balance),
|
fundingConfirmedBalance: BN(balanceRes.unlocked_balance),
|
||||||
fundingAddress: addressRes.address
|
fundingAddress: addressRes.address
|
||||||
}))
|
}))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue