Skip to content

Commit

Permalink
fix re-estimating fee
Browse files Browse the repository at this point in the history
  • Loading branch information
KKA11010 committed Sep 14, 2023
1 parent 5bc508b commit 26abbd7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/screens/Payment/SelectAmount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 (
<>
<View style={styles.overview}>
Expand Down

0 comments on commit 26abbd7

Please sign in to comment.