From e2ed4cf00ba76d55fa80ac5e4115c51357ee93b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Rodriguez=20V=C3=A9lez?= Date: Mon, 23 Aug 2021 15:54:18 -0400 Subject: [PATCH] OPS: Deepscan --- screen/send/details.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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)}>