Skip to content

Commit 058fbca

Browse files
committed
Cleanup
1 parent 3693400 commit 058fbca

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

contracts/ibc-reflect/src/contract.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use cosmwasm_std::{
2-
attr, entry_point, from_slice, to_binary, wasm_execute, wasm_instantiate, BankMsg, Binary,
3-
ContractResult, CosmosMsg, Deps, DepsMut, Empty, Env, Event, IbcAcknowledgement,
4-
IbcBasicResponse, IbcChannel, IbcOrder, IbcPacket, IbcReceiveResponse, MessageInfo, Order,
5-
QueryResponse, Reply, ReplyOn, Response, StdError, StdResult, SubMsg, SubcallResponse,
2+
attr, entry_point, from_slice, to_binary, wasm_execute, BankMsg, Binary, ContractResult,
3+
CosmosMsg, Deps, DepsMut, Empty, Env, Event, IbcAcknowledgement, IbcBasicResponse, IbcChannel,
4+
IbcOrder, IbcPacket, IbcReceiveResponse, MessageInfo, Order, QueryResponse, Reply, ReplyOn,
5+
Response, StdError, StdResult, SubMsg, SubcallResponse, WasmMsg,
66
};
77

88
use crate::msg::{
@@ -160,9 +160,13 @@ pub fn ibc_channel_connect(
160160
let cfg = config(deps.storage).load()?;
161161
let chan_id = channel.endpoint.channel_id;
162162

163-
let label = format!("ibc-reflect-{}", &chan_id);
164-
let msg = wasm_instantiate(cfg.reflect_code_id, b"{}", vec![], label)?;
165-
163+
let msg = WasmMsg::Instantiate {
164+
admin: None,
165+
code_id: cfg.reflect_code_id,
166+
msg: b"{}".into(),
167+
send: vec![],
168+
label: format!("ibc-reflect-{}", &chan_id),
169+
};
166170
let sub_msg = SubMsg {
167171
id: INIT_CALLBACK_ID,
168172
msg: msg.into(),

contracts/reflect/src/contract.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ pub fn instantiate(
1717
info: MessageInfo,
1818
_msg: InstantiateMsg,
1919
) -> StdResult<Response<CustomMsg>> {
20-
let state = State {
21-
owner: info.sender.clone(),
22-
};
20+
let state = State { owner: info.sender };
2321
config(deps.storage).save(&state)?;
2422
Ok(Response::default())
2523
}

0 commit comments

Comments
 (0)