Skip to content

Commit

Permalink
adding transaction execution errors in logs (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
godmodegalactus authored Oct 16, 2024
1 parent 53bc7c5 commit 7c481d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/comparer/src/bot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7c481d1

Please sign in to comment.