From 9da9bee384588675dda11cf28b58e74d0ac7a030 Mon Sep 17 00:00:00 2001 From: cyan Date: Tue, 6 Aug 2024 13:01:38 +0200 Subject: [PATCH] make the error more readable when node fails to respond (#1570) --- cw_monero/lib/api/transaction_history.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cw_monero/lib/api/transaction_history.dart b/cw_monero/lib/api/transaction_history.dart index 5e33c6c56..c28f162be 100644 --- a/cw_monero/lib/api/transaction_history.dart +++ b/cw_monero/lib/api/transaction_history.dart @@ -110,7 +110,10 @@ Future createTransactionSync( })(); if (error != null) { - final message = error; + String message = error; + if (message.contains("RPC error")) { + message = "Invalid node response, please try again or switch node\n\ntrace: $message"; + } throw CreationTransactionException(message: message); }