From a1d6c6ad8e35419560779126094caedfb947c3ff Mon Sep 17 00:00:00 2001 From: laurentketterle-hub Date: Tue, 4 Aug 2026 03:44:43 +0200 Subject: [PATCH] fix(#278): add error toast notifications for failed transactions Show error toast alongside inline error message when deposit or withdraw transactions fail. Toast stays visible (duration: 0) so users can read the error message before retrying. --- src/screens/Deposit.tsx | 11 ++++++++--- src/screens/Withdraw.tsx | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/screens/Deposit.tsx b/src/screens/Deposit.tsx index 27ca1d1..4954381 100644 --- a/src/screens/Deposit.tsx +++ b/src/screens/Deposit.tsx @@ -212,9 +212,14 @@ export function Deposit({ onDone }: DepositProps) { if (e instanceof Error && e.message === 'Aborted') { return } - setTxError( - e instanceof Error ? e.message : 'Transaction failed — please try again.', - ) + const errMsg = e instanceof Error ? e.message : 'Transaction failed — please try again.' + setTxError(errMsg) + toast({ + tone: 'error', + title: 'Transaction failed', + message: errMsg, + duration: 0, + }) changeStep('amount') } } finally { diff --git a/src/screens/Withdraw.tsx b/src/screens/Withdraw.tsx index 0d3df41..5952572 100644 --- a/src/screens/Withdraw.tsx +++ b/src/screens/Withdraw.tsx @@ -117,9 +117,14 @@ export function Withdraw({ onDone, onBack }: WithdrawProps) { if (e instanceof Error && e.message === 'Aborted') { return } - setTxError( - e instanceof Error ? e.message : 'Transaction failed — please try again.', - ) + const errMsg = e instanceof Error ? e.message : 'Transaction failed — please try again.' + setTxError(errMsg) + toast({ + tone: 'error', + title: 'Transaction failed', + message: errMsg, + duration: 0, + }) changeStep('amount') } } finally {