diff --git a/lib/wallet.js b/lib/wallet.js index 8e2eecde..150a9f80 100644 --- a/lib/wallet.js +++ b/lib/wallet.js @@ -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 } })