From d96c47a00a34244f790d544aeed29e9880ae578d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 10 Jun 2024 17:54:25 -0300 Subject: fix #8886 actually, fee are added not substracted --- .../bank-ui/src/pages/PaytoWireTransferForm.tsx | 50 +++++----------------- packages/taler-util/src/http-client/types.ts | 4 +- 2 files changed, 14 insertions(+), 40 deletions(-) (limited to 'packages') diff --git a/packages/bank-ui/src/pages/PaytoWireTransferForm.tsx b/packages/bank-ui/src/pages/PaytoWireTransferForm.tsx index bb408e497..90b41d331 100644 --- a/packages/bank-ui/src/pages/PaytoWireTransferForm.tsx +++ b/packages/bank-ui/src/pages/PaytoWireTransferForm.tsx @@ -114,14 +114,8 @@ export function PaytoWireTransferForm({ const wireFee = config.wire_transfer_fees === undefined ? Amounts.zeroOfCurrency(config.currency) - // Amounts.parseOrThrow("YEIN:2.5") : Amounts.parseOrThrow(config.wire_transfer_fees); - const amountAfterFee = - !parsedAmount || Amounts.cmp(parsedAmount, wireFee) < 1 - ? undefined - : Amounts.sub(parsedAmount, wireFee).amount; - const errorsWire = undefinedIfEmpty({ account: !account ? i18n.str`Required` @@ -634,16 +628,16 @@ export function PaytoWireTransferForm({ )} -
-
-
-
- {Amounts.isZero(wireFee) ? undefined : ( + {Amounts.isZero(wireFee) ? undefined : ( +
+
+
+
- Fee + Cost
@@ -656,31 +650,11 @@ export function PaytoWireTransferForm({
- )}{" "} - {!parsedAmount || !amountAfterFee ? undefined : ( - -
-
- - - Recipient will receive - - -
-
- -
-
-
- )} -
+
+
- + )}
{routeCancel ? ( => ), ) .property("wire_type", codecOptionalDefault(codecForString(), "iban")) + .property("wire_transfer_fees", codecOptional(codecForAmountString())) .build("TalerCorebankApi.Config"); //FIXME: implement this codec @@ -1312,10 +1313,11 @@ export const codecForBankWithdrawalOperationStatus = ), ) .property("amount", codecOptional(codecForAmountString())) + .property("currency", codecOptional(codecForCurrencyName())) .property("suggested_amount", codecOptional(codecForAmountString())) .property("card_fees", codecOptional(codecForAmountString())) .property("sender_wire", codecOptional(codecForPaytoString())) - .property("suggested_exchange", codecOptional(codecForString())) + .property("suggested_exchange", codecOptional(codecForURL())) .property("confirm_transfer_url", codecOptional(codecForURL())) .property("wire_types", codecForList(codecForString())) .property("selected_reserve_pub", codecOptional(codecForString())) -- cgit v1.2.3