From 7c481d1d8c24547b3b3065352a5efedb0803fb0c Mon Sep 17 00:00:00 2001 From: galactus <96341601+godmodegalactus@users.noreply.github.com> Date: Wed, 16 Oct 2024 17:19:38 +0200 Subject: [PATCH] adding transaction execution errors in logs (#24) --- bin/comparer/src/bot.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/comparer/src/bot.rs b/bin/comparer/src/bot.rs index 2ce730f..6253399 100644 --- a/bin/comparer/src/bot.rs +++ b/bin/comparer/src/bot.rs @@ -386,14 +386,14 @@ where } let err_str = if is_slippage_error { - "Failed to execute TX : Max Slippage Reached" + "Failed to execute TX : Max Slippage Reached".to_string() } else if is_cu_error { - "Failed to execute TX : Exceeded CUs meter" + "Failed to execute TX : Exceeded CUs meter".to_string() } else { - "Failed to execute TX" + format!("Failed to execute TX : {err:?}") }; - return Ok((out_amount, false, accounts, 0, err_str.to_string())); + return Ok((out_amount, false, accounts, 0, err_str)); }; let Some(after_accounts) = simulation_result.value.accounts else {