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-util/src/wallet-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-util/src/wallet-types.ts')
-rw-r--r-- | packages/taler-util/src/wallet-types.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index 367d9c4c9..77c083e45 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -1555,12 +1555,22 @@ export const codecForAcceptTipRequest = (): Codec<AcceptTipRequest> => export interface AbortPayWithRefundRequest { proposalId: string; + + /** + * Move the payment immediately into an aborted state. + * The UI should warn the user that this might lead + * to money being lost. + * + * Defaults to false. + */ + cancelImmediately?: boolean; } export const codecForAbortPayWithRefundRequest = (): Codec<AbortPayWithRefundRequest> => buildCodecForObject<AbortPayWithRefundRequest>() .property("proposalId", codecForString()) + .property("cancelImmediately", codecOptional(codecForBoolean())) .build("AbortPayWithRefundRequest"); export interface GetFeeForDepositRequest { |