Skip to content

Commit 862e078

Browse files
committed
fix: do not allow max to go below 0
1 parent aab5af3 commit 862e078

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/screens/Wallets/LNURLPay/Amount.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ const Amount = ({
6767

6868
const max = useMemo(() => {
6969
// TODO: get routing fee
70-
const fee = 100;
71-
return Math.min(spendingBalance - fee, maxSendable);
70+
const fee = 10;
71+
const min = Math.min(spendingBalance - fee, maxSendable);
72+
return min < 0 ? 0 : min;
7273
}, [maxSendable, spendingBalance]);
7374

7475
const maxSendableProps = {

0 commit comments

Comments
 (0)