feat: add cryptoAtoms positive value sanity check
This commit is contained in:
parent
4339e58e6a
commit
2df54411c3
1 changed files with 3 additions and 1 deletions
|
|
@ -193,7 +193,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