From 30e5b7f6bf6fe7810f3fe0778e203b0e54d34b40 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 27 Mar 2024 19:03:26 +0100 Subject: wallet-core: report more info about (missing) fees --- packages/taler-util/src/wallet-types.ts | 18 ++++++++++++++++++ 1 file changed, 18 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 723e5a282..7b6da8a40 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -884,6 +884,11 @@ export interface PaymentInsufficientBalanceDetails { balanceReceiverAcceptable: AmountString; balanceReceiverDepositable: AmountString; maxEffectiveSpendAmount: AmountString; + /** + * Exchange doesn't have global fees configured for the relevant year, + * p2p payments aren't possible. + */ + missingGlobalFees: boolean; }; }; } @@ -1394,6 +1399,17 @@ export interface ExchangeListItem { exchangeUpdateStatus: ExchangeUpdateStatus; ageRestrictionOptions: number[]; + /** + * P2P payments are disabled with this exchange + * (e.g. because no global fees are configured). + */ + peerPaymentsDisabled: boolean; + + /** + * Set to true if this exchange doesn't charge any fees. + */ + noFees: boolean; + scopeInfo: ScopeInfo | undefined; lastUpdateTimestamp: TalerPreciseTimestamp | undefined; @@ -1473,6 +1489,8 @@ export const codecForExchangeListItem = (): Codec => .property("scopeInfo", codecForScopeInfo()) .property("lastUpdateErrorInfo", codecForAny()) .property("lastUpdateTimestamp", codecOptional(codecForPreciseTimestamp)) + .property("noFees", codecForBoolean()) + .property("peerPaymentsDisabled", codecForBoolean()) .build("ExchangeListItem"); export const codecForExchangesListResponse = (): Codec => -- cgit v1.2.3