diff --git a/frame/cosmos/types/src/macros.rs b/frame/cosmos/types/src/macros.rs index 370075d..5bfeef3 100644 --- a/frame/cosmos/types/src/macros.rs +++ b/frame/cosmos/types/src/macros.rs @@ -39,13 +39,12 @@ mod tests { cosmos::bank::v1beta1::MsgSend, cosmwasm::wasm::v1::{MsgExecuteContract, MsgStoreCode}, prost::Name, - traits::Message, Any, }; #[test] fn any_match_test() { - let any = Any { type_url: MsgSend::type_url(), value: MsgSend::default().encode_to_vec() }; + let any = Any::from_msg(&MsgSend::default()).unwrap(); let result = any_match!( any, { MsgSend => any.type_url, @@ -55,10 +54,7 @@ mod tests { ); assert_eq!(result, MsgSend::type_url()); - let any = Any { - type_url: MsgExecuteContract::type_url(), - value: MsgExecuteContract::default().encode_to_vec(), - }; + let any = Any::from_msg(&MsgExecuteContract::default()).unwrap(); let result = any_match!( any, { MsgSend => any.type_url,