mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-24 07:28:07 +01:00
Update SendDetails.tsx
This commit is contained in:
parent
8a0c7a18ce
commit
0964c1843a
1 changed files with 4 additions and 2 deletions
|
@ -110,8 +110,10 @@ const SendDetails = () => {
|
|||
const [dumb, setDumb] = useState(false);
|
||||
const { isEditable } = routeParams;
|
||||
// if utxo is limited we use it to calculate available balance
|
||||
const balance: number = utxos ? utxos.reduce((prev, curr) => prev + curr.value, 0) : (wallet?.getBalance() ?? 0);
|
||||
const allBalance = formatBalanceWithoutSuffix(balance, BitcoinUnit.BTC, true);
|
||||
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]);
|
||||
|
||||
// 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…
Add table
Reference in a new issue