From 03b12d2b27e9d4038e2b02b303a0401160ebc632 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Fri, 20 Jan 2023 15:44:53 -0300
Subject: fix wrong fee calculation

---
 .../taler-wallet-webextension/src/cta/TransferCreate/views.tsx    | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/cta/TransferCreate/views.tsx')

diff --git a/packages/taler-wallet-webextension/src/cta/TransferCreate/views.tsx b/packages/taler-wallet-webextension/src/cta/TransferCreate/views.tsx
index 373af8f74..a28b13141 100644
--- a/packages/taler-wallet-webextension/src/cta/TransferCreate/views.tsx
+++ b/packages/taler-wallet-webextension/src/cta/TransferCreate/views.tsx
@@ -14,6 +14,7 @@
  GNU Taler; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
  */
 
+import { Amounts } from "@gnu-taler/taler-util";
 import { format } from "date-fns";
 import { h, VNode } from "preact";
 import { ErrorTalerOperation } from "../../components/ErrorTalerOperation.js";
@@ -23,7 +24,7 @@ import { Link, SubTitle, WalletAction } from "../../components/styled/index.js";
 import { useTranslationContext } from "../../context/translation.js";
 import { Button } from "../../mui/Button.js";
 import { TextField } from "../../mui/TextField.js";
-import { TransferDetails } from "../../wallet/Transaction.js";
+import { getAmountWithFee, TransferDetails } from "../../wallet/Transaction.js";
 import { State } from "./index.js";
 
 export function ReadyView({
@@ -114,10 +115,7 @@ export function ReadyView({
           title={i18n.str`Details`}
           text={
             <TransferDetails
-              amount={{
-                effective: toBeReceived,
-                raw: debitAmount,
-              }}
+              amount={getAmountWithFee(debitAmount, toBeReceived, "debit")}
             />
           }
         />
-- 
cgit v1.2.3

