mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-19 05:45:15 +01:00
parent
c4bca5e1c5
commit
7cb22e9f50
@ -112,10 +112,8 @@ const SendDetails = () => {
|
||||
const [dumb, setDumb] = useState(false);
|
||||
const { isEditable } = routeParams;
|
||||
// if utxo is limited we use it to calculate available balance
|
||||
const balance = useMemo(() => {
|
||||
return utxos ? utxos.reduce((prev, curr) => prev + curr.value, 0) : (wallet?.getBalance() ?? 0);
|
||||
}, [utxos, wallet]);
|
||||
const allBalance = useMemo(() => formatBalanceWithoutSuffix(balance, BitcoinUnit.BTC, true), [balance]);
|
||||
const balance: number = utxos ? utxos.reduce((prev, curr) => prev + curr.value, 0) : (wallet?.getBalance() ?? 0);
|
||||
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/vbyte fee
|
||||
|
Loading…
Reference in New Issue
Block a user