Merge remote-tracking branch 'upstream/defiant-dingirma' into fix/flat-schema
This commit is contained in:
commit
db32ad4f16
29 changed files with 2454 additions and 3157 deletions
|
|
@ -104,7 +104,7 @@ function mergeStatus (a, b) {
|
|||
if (!a) return b
|
||||
if (!b) return a
|
||||
|
||||
return { status: mergeStatusMode(a.status, b.status) }
|
||||
return { receivedCryptoAtoms: a.receivedCryptoAtoms, status: mergeStatusMode(a.status, b.status) }
|
||||
}
|
||||
|
||||
function mergeStatusMode (a, b) {
|
||||
|
|
@ -122,8 +122,11 @@ function mergeStatusMode (a, b) {
|
|||
}
|
||||
|
||||
function getWalletStatus (settings, tx) {
|
||||
const fudgeFactorEnabled = configManager.unscoped(settings.config).fudgeFactorActive
|
||||
const fudgeFactor = fudgeFactorEnabled ? 100 : 0
|
||||
|
||||
const walletStatusPromise = fetchWallet(settings, tx.cryptoCode)
|
||||
.then(r => r.wallet.getStatus(r.account, tx.toAddress, tx.cryptoAtoms, tx.cryptoCode))
|
||||
.then(r => r.wallet.getStatus(r.account, tx.toAddress, tx.cryptoAtoms.minus(fudgeFactor), tx.cryptoCode))
|
||||
|
||||
return Promise.all([
|
||||
walletStatusPromise,
|
||||
|
|
@ -169,7 +172,7 @@ function getStatus (settings, tx, machineId) {
|
|||
|
||||
const status = isAuthorized ? 'authorized' : unauthorizedStatus
|
||||
|
||||
return { status }
|
||||
return { receivedCryptoAtoms: statusRec.receivedCryptoAtoms, status }
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue