From 6702d63850a17263c6757e7d3521042c0c0667e4 Mon Sep 17 00:00:00 2001 From: Victor Kirov Date: Tue, 13 Feb 2024 13:06:37 +0200 Subject: [PATCH] Don't log insufficient funds message --- src/app/screens/sendBtc/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/screens/sendBtc/index.tsx b/src/app/screens/sendBtc/index.tsx index 7bd42fe84..6f43eb583 100644 --- a/src/app/screens/sendBtc/index.tsx +++ b/src/app/screens/sendBtc/index.tsx @@ -89,7 +89,11 @@ function SendBtcScreen() { setAmountSats(transactionDetails.summary.outputs[0].amount.toString()); } } catch (e) { - console.error(e); + if (!(e instanceof Error) || !e.message.includes('Insufficient funds')) { + // don't log the error if it's just an insufficient funds error + console.error(e); + } + setTransaction(undefined); setSummary(undefined); } finally {