diff options
author | Florian Dold <florian@dold.me> | 2023-01-11 14:33:35 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-01-11 14:33:35 +0100 |
commit | c3fdbd291f3d74d35f524f96ded6e3c6c85712e0 (patch) | |
tree | 9501cdb65e534df2ed45ec078b534cc556e6bdda /packages/taler-wallet-core/src/wallet-api-types.ts | |
parent | afd6f48b5782c1b9c2eb682c7c29cc131026bd95 (diff) | |
download | wallet-core-c3fdbd291f3d74d35f524f96ded6e3c6c85712e0.tar.xz |
wallet-core: introduce abortPay request
This request supersedes the abortPayWithRefund request, as that's too
implementation-focused and does not describe well what's happening.
Also, abortPay can be forced to transition a transaction immediately
into an "aborted" state (either from "paying" or "aborting").
Diffstat (limited to 'packages/taler-wallet-core/src/wallet-api-types.ts')
-rw-r--r-- | packages/taler-wallet-core/src/wallet-api-types.ts | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/packages/taler-wallet-core/src/wallet-api-types.ts b/packages/taler-wallet-core/src/wallet-api-types.ts index 1ea57a27d..ecabb9af0 100644 --- a/packages/taler-wallet-core/src/wallet-api-types.ts +++ b/packages/taler-wallet-core/src/wallet-api-types.ts @@ -24,7 +24,7 @@ * Imports. */ import { - AbortPayWithRefundRequest, + AbortPayWithRefundRequest as AbortPayRequest, AcceptBankIntegratedWithdrawalRequest, AcceptExchangeTosRequest, AcceptManualWithdrawalRequest, @@ -150,7 +150,7 @@ export enum WalletApiOperation { GetExchangeTos = "getExchangeTos", GetExchangeDetailedInfo = "getExchangeDetailedInfo", RetryPendingNow = "retryPendingNow", - AbortFailedPayWithRefund = "abortFailedPayWithRefund", + AbortPay = "abortPay", ConfirmPay = "confirmPay", DumpCoins = "dumpCoins", SetCoinSuspended = "setCoinSuspended", @@ -329,11 +329,13 @@ export type ConfirmPayOp = { }; /** - * Abort a pending payment with a refund. + * Abort a pending payment. + * Puts the payment into an "aborting" state + * that can be cancelled. */ -export type AbortPayWithRefundOp = { - op: WalletApiOperation.AbortFailedPayWithRefund; - request: AbortPayWithRefundRequest; +export type AbortPayOp = { + op: WalletApiOperation.AbortPay; + request: AbortPayRequest; response: EmptyObject; }; @@ -827,7 +829,7 @@ export type WalletOperations = { [WalletApiOperation.GetContractTermsDetails]: GetContractTermsDetailsOp; [WalletApiOperation.WithdrawTestkudos]: WithdrawTestkudosOp; [WalletApiOperation.ConfirmPay]: ConfirmPayOp; - [WalletApiOperation.AbortFailedPayWithRefund]: AbortPayWithRefundOp; + [WalletApiOperation.AbortPay]: AbortPayOp; [WalletApiOperation.GetBalances]: GetBalancesOp; [WalletApiOperation.GetTransactions]: GetTransactionsOp; [WalletApiOperation.GetTransactionById]: GetTransactionByIdOp; |