Skip to content

Commit

Permalink
fix reflect
Browse files Browse the repository at this point in the history
  • Loading branch information
NeverHappened committed Aug 22, 2024
1 parent 6b60782 commit e491016
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion contracts/reflect/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@ pub fn query(deps: Deps<InterchainQueries>, env: Env, msg: QueryMsg) -> StdResul
pub fn reply(_deps: DepsMut, _env: Env, msg: Reply) -> StdResult<Response> {
match msg.id {
REFLECT_REPLY_ID => {
Ok(Response::default().set_data(msg.result.unwrap().msg_responses[0].clone().value))
let res = Response::default();

let msg_responses = msg.result.unwrap().msg_responses;
if msg_responses.is_empty() {
Ok(res)
} else {
Ok(res.set_data(msg_responses[0].clone().value))
}
}
_ => {
unimplemented!()
Expand Down

0 comments on commit e491016

Please sign in to comment.