Skip to content

Commit b1e0e12

Browse files
committed
Do nothing if user rejects broadcasting a transaction.
1 parent 3894e4c commit b1e0e12

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

react/lib/util/cashtab.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ export const openCashtabPayment = async (bip21Url: string, fallbackUrl?: string)
8080
window.open(webUrl, '_blank');
8181
}
8282
} catch (error) {
83-
console.warn('Cashtab payment failed, falling back to web interface:', error);
83+
if (error instanceof CashtabAddressDeniedError) {
84+
// User rejected the transaction - do nothing for now
85+
// This case is handled here in case we want to add specific behavior in the future
86+
return;
87+
}
88+
8489
// If extension interaction fails, fall back to web Cashtab
8590
const webUrl = fallbackUrl || `https://cashtab.com/#/send?bip21=${encodeURIComponent(bip21Url)}`;
8691
window.open(webUrl, '_blank');

0 commit comments

Comments
 (0)