Fix cash-out exchange behavior for 'rejected' tx
A TX on the 'rejected' state should still be watched for authorization. This fixes the bug where delayed cash-out confirmations would not trigger a exchange sell command.
This commit is contained in:
parent
df13f2ed90
commit
9364eb5132
1 changed files with 2 additions and 2 deletions
|
|
@ -119,10 +119,10 @@ function updateCassettes (t, tx) {
|
|||
}
|
||||
|
||||
function wasJustAuthorized (oldTx, newTx, isZeroConf) {
|
||||
const isAuthorized = () => _.includes(oldTx.status, ['notSeen', 'published']) &&
|
||||
const isAuthorized = () => _.includes(oldTx.status, ['notSeen', 'published', 'rejected']) &&
|
||||
_.includes(newTx.status, ['authorized', 'instant', 'confirmed'])
|
||||
|
||||
const isConfirmed = () => _.includes(oldTx.status, ['notSeen', 'published', 'authorized']) &&
|
||||
const isConfirmed = () => _.includes(oldTx.status, ['notSeen', 'published', 'authorized', 'rejected']) &&
|
||||
_.includes(newTx.status, ['instant', 'confirmed'])
|
||||
|
||||
return isZeroConf ? isAuthorized() : isConfirmed()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue