From c3fdbd291f3d74d35f524f96ded6e3c6c85712e0 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 11 Jan 2023 14:33:35 +0100 Subject: 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"). --- packages/taler-util/src/wallet-types.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'packages/taler-util/src') 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 => 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 => buildCodecForObject() .property("proposalId", codecForString()) + .property("cancelImmediately", codecOptional(codecForBoolean())) .build("AbortPayWithRefundRequest"); export interface GetFeeForDepositRequest { -- cgit v1.2.3