diff options
Diffstat (limited to 'packages/taler-wallet-core/src/pay-peer-pull-credit.ts')
-rw-r--r-- | packages/taler-wallet-core/src/pay-peer-pull-credit.ts | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/packages/taler-wallet-core/src/pay-peer-pull-credit.ts b/packages/taler-wallet-core/src/pay-peer-pull-credit.ts index 14b3eeaf0..b7fb13da3 100644 --- a/packages/taler-wallet-core/src/pay-peer-pull-credit.ts +++ b/packages/taler-wallet-core/src/pay-peer-pull-credit.ts @@ -1039,7 +1039,10 @@ export async function initiatePeerPullPayment( const withdrawalGroupId = encodeCrock(getRandomBytes(32)); const mergeReserveRowId = mergeReserveInfo.rowId; - checkDbInvariant(!!mergeReserveRowId, `merge reserve for ${exchangeBaseUrl} without rowid`); + checkDbInvariant( + !!mergeReserveRowId, + `merge reserve for ${exchangeBaseUrl} without rowid`, + ); const contractEncNonce = encodeCrock(getRandomBytes(24)); @@ -1184,15 +1187,31 @@ export function computePeerPullCreditTransactionActions( ): TransactionAction[] { switch (pullCreditRecord.status) { case PeerPullPaymentCreditStatus.PendingCreatePurse: - return [TransactionAction.Abort, TransactionAction.Suspend]; + return [ + TransactionAction.Retry, + TransactionAction.Abort, + TransactionAction.Suspend, + ]; case PeerPullPaymentCreditStatus.PendingMergeKycRequired: - return [TransactionAction.Abort, TransactionAction.Suspend]; + return [ + TransactionAction.Retry, + TransactionAction.Abort, + TransactionAction.Suspend, + ]; case PeerPullPaymentCreditStatus.PendingReady: - return [TransactionAction.Abort, TransactionAction.Suspend]; + return [ + TransactionAction.Retry, + TransactionAction.Abort, + TransactionAction.Suspend, + ]; case PeerPullPaymentCreditStatus.Done: return [TransactionAction.Delete]; case PeerPullPaymentCreditStatus.PendingWithdrawing: - return [TransactionAction.Abort, TransactionAction.Suspend]; + return [ + TransactionAction.Retry, + TransactionAction.Abort, + TransactionAction.Suspend, + ]; case PeerPullPaymentCreditStatus.SuspendedCreatePurse: return [TransactionAction.Resume, TransactionAction.Abort]; case PeerPullPaymentCreditStatus.SuspendedReady: @@ -1204,7 +1223,11 @@ export function computePeerPullCreditTransactionActions( case PeerPullPaymentCreditStatus.Aborted: return [TransactionAction.Delete]; case PeerPullPaymentCreditStatus.AbortingDeletePurse: - return [TransactionAction.Suspend, TransactionAction.Fail]; + return [ + TransactionAction.Retry, + TransactionAction.Suspend, + TransactionAction.Fail, + ]; case PeerPullPaymentCreditStatus.Failed: return [TransactionAction.Delete]; case PeerPullPaymentCreditStatus.Expired: |