Skip to content

Commit 8d4a842

Browse files
authored
Merge pull request #573 from code-payments/fix/handle-idempotency-properly-for-payment-failures
fix(session): handle idempotencyKeys properly when hitting payment failures
2 parents 161a400 + c19d1b3 commit 8d4a842

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

app/src/main/java/com/getcode/SessionController.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,9 @@ class SessionController @Inject constructor(
12901290
resources.getString(R.string.error_description_payment_failed),
12911291
)
12921292

1293+
// Allow the payment request to be scanned again upon a failure state hit
1294+
scannedRendezvous.remove(paymentConfirmation.payload.rendezvous.publicKey)
1295+
12931296
ErrorUtils.handleError(error)
12941297
state.update { uiModel ->
12951298
uiModel.copy(

0 commit comments

Comments
 (0)