hotfix: add fudge factor
This commit is contained in:
parent
bf341476bb
commit
fa69d2a030
18 changed files with 650 additions and 249 deletions
|
|
@ -124,10 +124,10 @@ function getStatus (account, toAddress, requested, cryptoCode) {
|
|||
const confirmed = _.compose(sum, toBn, filterConfirmed)(transfers)
|
||||
const pending = _.compose(sum, toBn, filterPending)(transfers)
|
||||
|
||||
if (confirmed.gte(requested)) return { status: 'confirmed' }
|
||||
if (pending.gte(requested)) return { status: 'authorized' }
|
||||
if (pending.gt(0)) return { status: 'insufficientFunds' }
|
||||
return { status: 'notSeen' }
|
||||
if (confirmed.gte(requested)) return { receivedCryptoAtoms: confirmed, status: 'confirmed' }
|
||||
if (pending.gte(requested)) return { receivedCryptoAtoms: pending, status: 'authorized' }
|
||||
if (pending.gt(0)) return { receivedCryptoAtoms: pending, status: 'insufficientFunds' }
|
||||
return { receivedCryptoAtoms: pending, status: 'notSeen' }
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue