Revert "Update SendDetails.tsx"

This reverts commit 0964c1843a.
This commit is contained in:
Marcos Rodriguez Velez 2024-12-30 19:24:54 -04:00
parent c4bca5e1c5
commit 7cb22e9f50

View File

@ -112,10 +112,8 @@ const SendDetails = () => {
const [dumb, setDumb] = useState(false); const [dumb, setDumb] = useState(false);
const { isEditable } = routeParams; const { isEditable } = routeParams;
// if utxo is limited we use it to calculate available balance // if utxo is limited we use it to calculate available balance
const balance = useMemo(() => { const balance: number = utxos ? utxos.reduce((prev, curr) => prev + curr.value, 0) : (wallet?.getBalance() ?? 0);
return utxos ? utxos.reduce((prev, curr) => prev + curr.value, 0) : (wallet?.getBalance() ?? 0); const allBalance = formatBalanceWithoutSuffix(balance, BitcoinUnit.BTC, true);
}, [utxos, wallet]);
const allBalance = useMemo(() => formatBalanceWithoutSuffix(balance, BitcoinUnit.BTC, true), [balance]);
// if cutomFee is not set, we need to choose highest possible fee for wallet balance // 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/vbyte fee // if there are no funds for even Slow option, use 1 sat/vbyte fee