mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-05 16:33:36 +00:00
infinite loop initialization, wallet endpoint structure, zapdialog debug
This commit is contained in:
1 parent
4672413b04
commit
e14d4e887f
6 files changed
+284
-23
No files matched your search
@@ -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',
|
||||
|
||||
Reference in new issue
Block a user