adding transaction execution errors in logs (#24)

This commit is contained in:
galactus 2024-10-16 17:19:38 +02:00 committed by GitHub
parent 53bc7c5937
commit 7c481d1d8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -386,14 +386,14 @@ where
} }
let err_str = if is_slippage_error { 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 { } else if is_cu_error {
"Failed to execute TX : Exceeded CUs meter" "Failed to execute TX : Exceeded CUs meter".to_string()
} else { } 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 { let Some(after_accounts) = simulation_result.value.accounts else {