Skip to content

Commit

Permalink
add explanatory comments
Browse files Browse the repository at this point in the history
  • Loading branch information
joldie777 committed Jun 18, 2024
1 parent 33e0cb1 commit b4a9925
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions contracts/ibc_transfer/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,12 @@ fn prepare_sudo_payload(mut deps: DepsMut, _env: Env, msg: Reply) -> StdResult<R
&msg.result
.into_result()
.map_err(StdError::generic_err)?
.msg_responses[0]
.msg_responses[0] // msg_responses must have exactly one Msg response: https://github.com/neutron-org/neutron/blob/28b1d2ce968aaf1866e92d5286487f079eba3370/wasmbinding/message_plugin.go#L307
.clone()
.value
.to_vec(),
)
.map_err(|e| StdError::generic_err(format!("failed to parse response: {:?}", e)))?;
deps.api
.debug(format!("WASMDEBUG: reply msg: {:?}", resp).as_str());
let seq_id = resp.sequence_id;
let channel_id = resp.channel;
save_sudo_payload(deps.branch().storage, channel_id, seq_id, payload)?;
Expand Down
2 changes: 1 addition & 1 deletion contracts/neutron_interchain_txs/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ fn prepare_sudo_payload(mut deps: DepsMut, _env: Env, msg: Reply) -> StdResult<R
&msg.result
.into_result()
.map_err(StdError::generic_err)?
.msg_responses[0]
.msg_responses[0] // msg_responses must have exactly one Msg response: https://github.com/neutron-org/neutron/blob/28b1d2ce968aaf1866e92d5286487f079eba3370/wasmbinding/message_plugin.go#L443
.clone()
.value
.to_vec(),
Expand Down

0 comments on commit b4a9925

Please sign in to comment.