summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/types
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2020-11-04 12:07:34 +0100
committerFlorian Dold <florian@dold.me>2020-11-04 12:07:34 +0100
commitdf9144129653cf596fc819cf9e7c96f6d0470a69 (patch)
tree7286ef33e726f5f2b323bfa48ad09fae56ab890e /packages/taler-wallet-core/src/types
parentdffb293f2a3fa836ee007f19e36f873ed5d295e7 (diff)
downloadwallet-core-df9144129653cf596fc819cf9e7c96f6d0470a69.tar.gz
wallet-core-df9144129653cf596fc819cf9e7c96f6d0470a69.tar.bz2
wallet-core-df9144129653cf596fc819cf9e7c96f6d0470a69.zip
handle transient pay errors (fixes #6607)
Also add a test case for the behavior.
Diffstat (limited to 'packages/taler-wallet-core/src/types')
-rw-r--r--packages/taler-wallet-core/src/types/notifications.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/types/notifications.ts b/packages/taler-wallet-core/src/types/notifications.ts
index d86c5ae59..7faf730ef 100644
--- a/packages/taler-wallet-core/src/types/notifications.ts
+++ b/packages/taler-wallet-core/src/types/notifications.ts
@@ -53,6 +53,7 @@ export enum NotificationType {
ProposalOperationError = "proposal-error",
TipOperationError = "tip-error",
PayOperationError = "pay-error",
+ PayOperationSuccess = "pay-operation-success",
WithdrawOperationError = "withdraw-error",
ReserveNotYetFound = "reserve-not-yet-found",
ReserveOperationError = "reserve-error",
@@ -220,6 +221,18 @@ export interface ReserveRegisteredWithBankNotification {
type: NotificationType.ReserveRegisteredWithBank;
}
+/**
+ * Notification sent when a pay (or pay replay) operation succeeded.
+ *
+ * We send this notification because the confirmPay request can return
+ * a "confirmed" response that indicates that the payment has been confirmed
+ * by the user, but we're still waiting for the payment to succeed or fail.
+ */
+export interface PayOperationSuccessNotification {
+ type: NotificationType.PayOperationSuccess;
+ proposalId: string;
+}
+
export type WalletNotification =
| WithdrawOperationErrorNotification
| ReserveOperationErrorNotification
@@ -254,4 +267,5 @@ export type WalletNotification =
| PendingOperationProcessedNotification
| ProposalRefusedNotification
| ReserveRegisteredWithBankNotification
- | ReserveNotYetFoundNotification;
+ | ReserveNotYetFoundNotification
+ | PayOperationSuccessNotification;