infinite loop initialization, wallet endpoint structure, zapdialog debug

This commit is contained in:
lemonknowsall committed 2025-10-06 17:27:30 -07:00
1 parent 4672413b04
commit e14d4e887f
6 files changed
+284 -23

No files matched your search

+11
View File
@@ -389,6 +389,17 @@ export function ZapDialog({ target, children, className }: ZapDialogProps) {
const handleZap = () => {
const finalAmount = typeof amount === 'string' ? parseInt(amount, 10) : amount;
// Validate the amount
if (isNaN(finalAmount) || finalAmount <= 0) {
toast({
title: 'Invalid amount',
description: 'Please enter a valid amount greater than 0.',
variant: 'destructive',
});
return;
}
if (canPayWithCashu && finalAmount > cashuBalance) {
toast({
title: 'Insufficient Cashu balance',