Skip to content

Commit

Permalink
cosmwasm: updated sequence bumping logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kakucodes committed Feb 10, 2025
1 parent e00c520 commit 6a5ee31
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cosmwasm/contracts/wormhole/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,7 @@ fn handle_post_message(

let emitter = extend_address_to_32(&deps.api.addr_canonicalize(info.sender.as_str())?);
let sequence = SEQUENCE.update(deps.storage, emitter.as_slice(), |seq| {
seq.map(|seq| seq + 1).ok_or(StdError::generic_err(
"Sequence not found - handle post message",
))
Ok::<u64, StdError>(seq.unwrap_or_default() + 1u64)
})?;

Ok(Response::new()
Expand Down
Binary file modified wormchain/interchaintest/contracts/cw_wormhole.wasm
Binary file not shown.

0 comments on commit 6a5ee31

Please sign in to comment.