From fef7985be3ac1440d02f9ddc9f5aa141586a5259 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 5 Dec 2023 18:51:58 +0100 Subject: wallet-core: make conversion more robust against errors --- packages/taler-util/src/wallet-types.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'packages/taler-util/src/wallet-types.ts') diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index 8e72a4949..f19a0dd10 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -2782,6 +2782,16 @@ export interface WithdrawalExchangeAccountDetails { */ paytoUri: string; + /** + * Status that indicates whether the account can be used + * by the user to send funds for a withdrawal. + * + * ok: account should be shown to the user + * error: account should not be shown to the user, UIs might render the error (in conversionError), + * especially in dev mode. + */ + status: "ok" | "error"; + /** * Transfer amount. Might be in a different currency than the requested * amount for withdrawal. @@ -2804,4 +2814,9 @@ export interface WithdrawalExchangeAccountDetails { * exchange. */ creditRestrictions?: AccountRestriction[]; + + /** + * Error that happened when attempting to request the conversion rate. + */ + conversionError?: TalerErrorDetail; } -- cgit v1.2.3