diff --git a/screen/send/details.js b/screen/send/details.js index 3ebb0a85e..ad42d6fc6 100644 --- a/screen/send/details.js +++ b/screen/send/details.js @@ -77,6 +77,10 @@ const SendDetails = () => { const [payjoinUrl, setPayjoinUrl] = useState(null); const [changeAddress, setChangeAddress] = useState(); const [dumb, setDumb] = useState(false); + // if utxo is limited we use it to calculate available balance + const balance = utxo ? utxo.reduce((prev, curr) => prev + curr.value, 0) : wallet?.getBalance(); + const allBalance = formatBalanceWithoutSuffix(balance, BitcoinUnit.BTC, true); + // if cutomFee is not set, we need to choose highest possible fee for wallet balance // if there are no funds for even Slow option, use 1 sat/byte fee const feeRate = useMemo(() => { @@ -1336,11 +1340,6 @@ const SendDetails = () => { ); } - - // if utxo is limited we use it to calculate available balance - const balance = utxo ? utxo.reduce((prev, curr) => prev + curr.value, 0) : wallet.getBalance(); - const allBalance = formatBalanceWithoutSuffix(balance, BitcoinUnit.BTC, true); - return ( setWidth(e.nativeEvent.layout.width)}>