Merge pull request #1094 from chaotixkilla/fix-xmr-send-coins-interface
Fix XMR sendCoins interface
This commit is contained in:
commit
bf816af0e7
2 changed files with 4 additions and 3 deletions
|
|
@ -99,11 +99,12 @@ function balance (account, cryptoCode) {
|
|||
return accountBalance(cryptoCode)
|
||||
}
|
||||
|
||||
function sendCoins (account, address, cryptoAtoms, cryptoCode) {
|
||||
function sendCoins (account, tx, settings, operatorId, feeMultiplier) {
|
||||
const { toAddress, cryptoAtoms, cryptoCode } = tx
|
||||
return checkCryptoCode(cryptoCode)
|
||||
.then(() => refreshWallet())
|
||||
.then(() => fetch('transfer_split', {
|
||||
destinations: [{ amount: cryptoAtoms, address }],
|
||||
destinations: [{ amount: cryptoAtoms, address: toAddress }],
|
||||
account_index: 0,
|
||||
subaddr_indices: [],
|
||||
priority: 0,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ function _balance (settings, cryptoCode) {
|
|||
return fetchWallet(settings, cryptoCode)
|
||||
.then(r => r.wallet.balance(r.account, cryptoCode, settings, r.operatorId))
|
||||
.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 => {
|
||||
lastBalance[cryptoCode] = r
|
||||
return r
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue