Skip to content

Commit

Permalink
fix default ISM cosmwasm
Browse files Browse the repository at this point in the history
  • Loading branch information
tkporter committed Dec 20, 2023
1 parent 51d0515 commit ff8692f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rust/chains/hyperlane-cosmos/src/mailbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ impl Mailbox for CosmosMailbox {
.await?;
let response: mailbox::DefaultIsmResponse = serde_json::from_slice(&data)?;

// convert Hex to H256
let ism = H256::from_slice(&hex::decode(response.default_ism)?);
Ok(ism)
// convert bech32 to H256
let ism = CosmosAddress::from_str(&response.default_ism)?;
Ok(ism.digest())
}

#[instrument(err, ret, skip(self))]
Expand All @@ -166,7 +166,7 @@ impl Mailbox for CosmosMailbox {
.await?;
let response: mailbox::RecipientIsmResponse = serde_json::from_slice(&data)?;

// convert Hex to H256
// convert bech32 to H256
let ism = CosmosAddress::from_str(&response.ism)?;
Ok(ism.digest())
}
Expand Down

0 comments on commit ff8692f

Please sign in to comment.