From 26abbd7b431fb216d110209fc3830a72ebe63076 Mon Sep 17 00:00:00 2001 From: First-Terraner Date: Thu, 14 Sep 2023 19:36:28 +0200 Subject: [PATCH 1/2] fix re-estimating fee --- src/screens/Payment/SelectAmount.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/screens/Payment/SelectAmount.tsx b/src/screens/Payment/SelectAmount.tsx index 65d981c4..ce3bad90 100644 --- a/src/screens/Payment/SelectAmount.tsx +++ b/src/screens/Payment/SelectAmount.tsx @@ -159,9 +159,9 @@ export default function SelectAmountScreen({ navigation, route }: TSelectAmountP // check if is melting process useEffect(() => setShouldEstimate(!isSendEcash), [isSendEcash]) - // estimate fee each time the melt amount changes + // estimate fee each time the melt or swap amount changes useEffect(() => { - if (!isMelt || !isSwap) { return } + if (isSendEcash) { return } setFee({ estimation: 0, isCalculating: false }) setShouldEstimate(true) // eslint-disable-next-line react-hooks/exhaustive-deps @@ -256,6 +256,7 @@ interface IMeltOverviewProps { export function MeltOverview({ amount, balance, shouldEstimate, balTooLow, isInvoice, fee }: IMeltOverviewProps) { const { t } = useTranslation([NS.common]) const { color } = useThemeContext() + l({fee}) return ( <> From 8a855cf47af7f96518d0cb51075dde70812bdca3 Mon Sep 17 00:00:00 2001 From: First-Terraner Date: Thu, 14 Sep 2023 19:41:23 +0200 Subject: [PATCH 2/2] Add "satoshi" to amount selection --- src/screens/Payment/SelectAmount.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/screens/Payment/SelectAmount.tsx b/src/screens/Payment/SelectAmount.tsx index ce3bad90..d206003f 100644 --- a/src/screens/Payment/SelectAmount.tsx +++ b/src/screens/Payment/SelectAmount.tsx @@ -191,6 +191,7 @@ export default function SelectAmountScreen({ navigation, route }: TSelectAmountP maxLength={8} /> + {(isMelt || isSwap || isSendEcash) && } @@ -256,7 +257,7 @@ interface IMeltOverviewProps { export function MeltOverview({ amount, balance, shouldEstimate, balTooLow, isInvoice, fee }: IMeltOverviewProps) { const { t } = useTranslation([NS.common]) const { color } = useThemeContext() - l({fee}) + l({ fee }) return ( <>