OPS: Deepscan

This commit is contained in:
Marcos Rodriguez Vélez 2021-08-23 15:54:18 -04:00
parent 000f75ee29
commit e2ed4cf00b

View file

@ -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 = () => {
</View>
);
}
// 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 (
<TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}>
<View style={[styles.root, stylesHook.root]} onLayout={e => setWidth(e.nativeEvent.layout.width)}>