Skip to content

Commit 20d9b10

Browse files
committed
Simplified admin parsing
1 parent 31df592 commit 20d9b10

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

cosmos-sdk-rs/src/cosmwasm.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,9 @@ impl TryFrom<proto::cosmwasm::wasm::v1beta1::MsgInstantiateContract> for MsgInst
174174
} else {
175175
Some(proto.label)
176176
};
177-
let admin = if proto.admin.is_empty() {
178-
None
179-
} else {
180-
Some(proto.admin.parse())
181-
};
182177
Ok(MsgInstantiateContract {
183178
sender: proto.sender.parse()?,
184-
admin: admin.transpose()?,
179+
admin: proto.admin.map(|admin| admin.parse()).transpose()?,
185180
code_id: proto.code_id,
186181
label,
187182
init_msg: proto.init_msg,

0 commit comments

Comments
 (0)