aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util/src
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-01-11 14:33:35 +0100
committerFlorian Dold <florian@dold.me>2023-01-11 14:33:35 +0100
commitc3fdbd291f3d74d35f524f96ded6e3c6c85712e0 (patch)
tree9501cdb65e534df2ed45ec078b534cc556e6bdda /packages/taler-util/src
parentafd6f48b5782c1b9c2eb682c7c29cc131026bd95 (diff)
downloadwallet-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')
-rw-r--r--packages/taler-util/src/wallet-types.ts10
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 {