Merge pull request #1138 from chaotixkilla/feat-cashout-nil-cryptovalue-check
Add cryptoAtoms positive value sanity check
This commit is contained in:
commit
b637b728ec
1 changed files with 3 additions and 1 deletions
|
|
@ -192,7 +192,9 @@ function getStatus (settings, tx, machineId) {
|
|||
? 'published'
|
||||
: 'rejected'
|
||||
|
||||
const status = isAuthorized ? 'authorized' : unauthorizedStatus
|
||||
// Sanity check to confirm if there's any cryptoatoms for which to dispense bills
|
||||
const authorizedStatus = isAuthorized ? 'authorized' : unauthorizedStatus
|
||||
const status = BN(tx.cryptoAtoms).gt(0) ? authorizedStatus : 'rejected'
|
||||
|
||||
return { receivedCryptoAtoms: statusRec.receivedCryptoAtoms, status }
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue