Skip to content

Commit

Permalink
use ErrorCodes::Ok
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 committed Oct 10, 2023
1 parent 4e2e596 commit de28845
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/relayer/src/chain/namada/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use namada::ledger::queries::RPC;
use namada::tendermint::block::Height as TmHeight;
use namada::tendermint_rpc::Client;
use namada::types::storage::{BlockHeight, Epoch, Key, PrefixValue};
use namada_apps::node::ledger::shell::ErrorCodes;
use tendermint::abci::{Event, EventAttribute};
use tendermint::merkle::proof::{ProofOp, ProofOps};

Expand Down Expand Up @@ -129,7 +130,7 @@ impl NamadaChain {
.map_err(|_| Error::invalid_height_no_source())?;
// Check if the tx is valid
let code = applied.get("code").expect("The code should exist");
if code != "0" {
if *code != String::from(ErrorCodes::Ok) {
return Ok(vec![IbcEventWithHeight::new(
IbcEvent::ChainError(format!(
"The transaction was invalid: Event {:?}",
Expand Down

0 comments on commit de28845

Please sign in to comment.