From e9a923c07d5f15f331be0a86a9aa77a2fc9dfb0e Mon Sep 17 00:00:00 2001 From: Philipp Walter Date: Wed, 28 Feb 2024 16:32:33 +0100 Subject: [PATCH] fix(transfer): fix txFee not updated --- src/screens/Lightning/CustomConfirm.tsx | 4 ++-- src/screens/Lightning/QuickConfirm.tsx | 4 ++-- src/screens/Transfer/Confirm.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/screens/Lightning/CustomConfirm.tsx b/src/screens/Lightning/CustomConfirm.tsx index b70a16868..bb31c6a05 100644 --- a/src/screens/Lightning/CustomConfirm.tsx +++ b/src/screens/Lightning/CustomConfirm.tsx @@ -53,9 +53,9 @@ const CustomConfirm = ({ const fiatTransactionFee = useDisplayValues(transactionFee); const clientBalance = useDisplayValues(order?.clientBalanceSat ?? 0); - // avoid flashing different price after confirmation + // TODO: avoid flashing different price & allocation after confirmation // eslint-disable-next-line react-hooks/exhaustive-deps - const txFee = useMemo(() => fiatTransactionFee.fiatValue, [orderId]); + const txFee = fiatTransactionFee.fiatValue; const lspFee = purchaseFeeValue.fiatValue - clientBalance.fiatValue; const handleConfirm = async (): Promise => { diff --git a/src/screens/Lightning/QuickConfirm.tsx b/src/screens/Lightning/QuickConfirm.tsx index 74e5a1c99..98d9d3ba3 100644 --- a/src/screens/Lightning/QuickConfirm.tsx +++ b/src/screens/Lightning/QuickConfirm.tsx @@ -48,9 +48,9 @@ const QuickConfirm = ({ const fiatTransactionFee = useDisplayValues(transactionFee); const clientBalance = useDisplayValues(order?.clientBalanceSat ?? 0); - // avoid flashing different price after confirmation + // TODO: avoid flashing different price & allocation after confirmation // eslint-disable-next-line react-hooks/exhaustive-deps - const txFee = useMemo(() => fiatTransactionFee.fiatValue, [orderId]); + const txFee = fiatTransactionFee.fiatValue; const lspFee = purchaseFeeValue.fiatValue - clientBalance.fiatValue; const savingsAmount = onchainBalance - spendingAmount; diff --git a/src/screens/Transfer/Confirm.tsx b/src/screens/Transfer/Confirm.tsx index 1ad4e9661..5e7da91b2 100644 --- a/src/screens/Transfer/Confirm.tsx +++ b/src/screens/Transfer/Confirm.tsx @@ -56,9 +56,9 @@ const Confirm = ({ const fiatTransactionFee = useDisplayValues(transactionFee); const clientBalance = useDisplayValues(order?.clientBalanceSat ?? 0); - // avoid flashing different price after confirmation + // TODO: avoid flashing different price & allocation after confirmation // eslint-disable-next-line react-hooks/exhaustive-deps - const txFee = useMemo(() => fiatTransactionFee.fiatValue, [orderId]); + const txFee = fiatTransactionFee.fiatValue; const lspFee = purchaseFeeValue.fiatValue - clientBalance.fiatValue; const handleConfirm = async (): Promise => {