From 12254d3d33116d85c21163c1a093a7c829eff881 Mon Sep 17 00:00:00 2001 From: Noah Saso Date: Fri, 24 May 2024 11:33:06 -0400 Subject: [PATCH] update cosmwasm-std to v1.5.4 and fix deprecated functions --- Cargo.lock | 40 +++++++++---------- Cargo.toml | 4 +- .../accessories/listener/src/contract.rs | 6 +-- contracts/accessories/listener/src/tests.rs | 6 +-- .../polytone-tester/src/contract.rs | 8 ++-- contracts/main/note/src/contract.rs | 13 +++--- contracts/main/note/src/tests.rs | 4 +- contracts/main/proxy/src/contract.rs | 4 +- contracts/main/voice/src/contract.rs | 17 ++++---- contracts/main/voice/src/ibc.rs | 6 +-- packages/polytone/src/ack.rs | 12 +++--- packages/polytone/src/callbacks.rs | 4 +- packages/polytone/src/handshake/mod.rs | 4 +- packages/polytone/src/handshake/note.rs | 2 +- packages/polytone/src/handshake/voice.rs | 2 +- 15 files changed, 67 insertions(+), 65 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a85e572..7175356 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -259,7 +259,7 @@ checksum = "7e141fb0f8be1c7b45887af94c88b182472b57c96b56773250ae00cd6a14a164" dependencies = [ "bs58", "hmac", - "k256 0.13.2", + "k256 0.13.1", "rand_core 0.6.4", "ripemd", "sha2 0.10.8", @@ -327,9 +327,9 @@ dependencies = [ [[package]] name = "bnum" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128a44527fc0d6abf05f9eda748b9027536e12dff93f5acc8449f51583309350" +checksum = "56953345e39537a3e18bdaeba4cb0c58a78c1f61f361dc0fa7c5c7340ae87c5f" [[package]] name = "bs58" @@ -443,7 +443,7 @@ dependencies = [ "cosmos-sdk-proto", "ecdsa 0.16.8", "eyre", - "k256 0.13.2", + "k256 0.13.1", "rand_core 0.6.4", "serde", "serde_json", @@ -457,32 +457,32 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.5.0" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8bb3c77c3b7ce472056968c745eb501c440fbc07be5004eba02782c35bfbbe3" +checksum = "dd50718a2b6830ce9eb5d465de5a018a12e71729d66b70807ce97e6dd14f931d" dependencies = [ "digest 0.10.7", "ecdsa 0.16.8", "ed25519-zebra", - "k256 0.13.2", + "k256 0.13.1", "rand_core 0.6.4", "thiserror", ] [[package]] name = "cosmwasm-derive" -version = "1.5.0" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea73e9162e6efde00018d55ed0061e93a108b5d6ec4548b4f8ce3c706249687" +checksum = "242e98e7a231c122e08f300d9db3262d1007b51758a8732cd6210b3e9faa4f3a" dependencies = [ "syn 1.0.109", ] [[package]] name = "cosmwasm-schema" -version = "1.5.0" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0df41ea55f2946b6b43579659eec048cc2f66e8c8e2e3652fc5e5e476f673856" +checksum = "7879036156092ad1c22fe0d7316efc5a5eceec2bc3906462a2560215f2a2f929" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -493,9 +493,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.5.0" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43609e92ce1b9368aa951b334dd354a2d0dd4d484931a5f83ae10e12a26c8ba9" +checksum = "0bb57855fbfc83327f8445ae0d413b1a05ac0d68c396ab4d122b2abd7bb82cb6" dependencies = [ "proc-macro2", "quote", @@ -504,9 +504,9 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.5.0" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04d6864742e3a7662d024b51a94ea81c9af21db6faea2f9a6d2232bb97c6e53e" +checksum = "78c1556156fdf892a55cced6115968b961eaaadd6f724a2c2cb7d1e168e32dd3" dependencies = [ "base64 0.21.5", "bech32", @@ -1862,9 +1862,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" +checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", "ecdsa 0.16.8", @@ -2940,9 +2940,9 @@ dependencies = [ [[package]] name = "serde-json-wasm" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a62a1fad1e1828b24acac8f2b468971dade7b8c3c2e672bcadefefb1f8c137" +checksum = "9e9213a07d53faa0b8dd81e767a54a8188a242fdb9be99ab75ec576a774bfdd7" dependencies = [ "serde", ] @@ -3296,7 +3296,7 @@ dependencies = [ "ed25519-consensus", "flex-error", "futures", - "k256 0.13.2", + "k256 0.13.1", "num-traits", "once_cell", "prost 0.12.3", diff --git a/Cargo.toml b/Cargo.toml index eb2d152..f7926d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,8 +25,8 @@ polytone-proxy = { path = "contracts/main/proxy", version = "1.0.0" } polytone-note = { path = "contracts/main/note", version = "1.0.0" } polytone-voice = { path = "contracts/main/voice", version = "1.0.0" } -cosmwasm-schema = "1.2.1" -cosmwasm-std = { version = "1.5.0", features = ["ibc3"] } +cosmwasm-schema = "1.5.4" +cosmwasm-std = { version = "1.5.4", features = ["ibc3"] } cw-storage-plus = "1.0.1" cw-utils = "1.0.1" cw2 = "1.0.1" diff --git a/contracts/accessories/listener/src/contract.rs b/contracts/accessories/listener/src/contract.rs index 91d9e2d..9677d31 100644 --- a/contracts/accessories/listener/src/contract.rs +++ b/contracts/accessories/listener/src/contract.rs @@ -1,6 +1,6 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; -use cosmwasm_std::{to_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult}; +use cosmwasm_std::{to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult}; use cw2::set_contract_version; use crate::error::ContractError; @@ -60,11 +60,11 @@ pub fn execute( #[cfg_attr(not(feature = "library"), entry_point)] pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { match msg { - QueryMsg::Note {} => to_binary(&NOTE.load(deps.storage)?), + QueryMsg::Note {} => to_json_binary(&NOTE.load(deps.storage)?), QueryMsg::Result { initiator, initiator_msg, - } => to_binary(&ResultResponse { + } => to_json_binary(&ResultResponse { callback: RESULTS.load(deps.storage, (initiator, initiator_msg))?, }), } diff --git a/contracts/accessories/listener/src/tests.rs b/contracts/accessories/listener/src/tests.rs index 242dc42..f249fdd 100644 --- a/contracts/accessories/listener/src/tests.rs +++ b/contracts/accessories/listener/src/tests.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{to_binary, Addr, Empty, Uint64}; +use cosmwasm_std::{to_json_binary, Addr, Empty, Uint64}; use cw_multi_test::{App, Contract, ContractWrapper, Executor}; use polytone::callbacks::{Callback, CallbackMessage}; @@ -87,7 +87,7 @@ fn test() { // Allows note to execute callback. let callback = CallbackMessage { initiator: Addr::unchecked(INITIATOR_ADDR), - initiator_msg: to_binary(INITIATOR_MSG).unwrap(), + initiator_msg: to_json_binary(INITIATOR_MSG).unwrap(), result: Callback::Execute(Result::Err("ERROR".to_string())), }; app.execute_contract( @@ -118,7 +118,7 @@ fn test() { listener, &QueryMsg::Result { initiator: INITIATOR_ADDR.to_string(), - initiator_msg: to_binary(INITIATOR_MSG).unwrap().to_string(), + initiator_msg: to_json_binary(INITIATOR_MSG).unwrap().to_string(), }, ) .unwrap(); diff --git a/contracts/accessories/polytone-tester/src/contract.rs b/contracts/accessories/polytone-tester/src/contract.rs index 7f45805..45d402b 100644 --- a/contracts/accessories/polytone-tester/src/contract.rs +++ b/contracts/accessories/polytone-tester/src/contract.rs @@ -1,7 +1,7 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult, WasmMsg, + to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult, WasmMsg, }; use cw2::set_contract_version; @@ -58,7 +58,7 @@ pub fn execute( } ExecuteMsg::RunOutOfGas {} => Ok(Response::default().add_message(WasmMsg::Execute { contract_addr: env.contract.address.into_string(), - msg: to_binary(&ExecuteMsg::RunOutOfGas {}).unwrap(), + msg: to_json_binary(&ExecuteMsg::RunOutOfGas {}).unwrap(), funds: vec![], })), } @@ -67,10 +67,10 @@ pub fn execute( #[cfg_attr(not(feature = "library"), entry_point)] pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { match msg { - QueryMsg::History {} => to_binary(&CallbackHistoryResponse { + QueryMsg::History {} => to_json_binary(&CallbackHistoryResponse { history: CALLBACK_HISTORY.load(deps.storage)?, }), - QueryMsg::HelloHistory {} => to_binary(&HelloHistoryResponse { + QueryMsg::HelloHistory {} => to_json_binary(&HelloHistoryResponse { history: HELLO_CALL_HISTORY.load(deps.storage)?, }), } diff --git a/contracts/main/note/src/contract.rs b/contracts/main/note/src/contract.rs index b32d89b..1725388 100644 --- a/contracts/main/note/src/contract.rs +++ b/contracts/main/note/src/contract.rs @@ -1,7 +1,8 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Binary, Deps, DepsMut, Env, IbcMsg, IbcTimeout, MessageInfo, Response, StdResult, + to_json_binary, Binary, Deps, DepsMut, Env, IbcMsg, IbcTimeout, MessageInfo, Response, + StdResult, }; use cw2::set_contract_version; use polytone::callbacks::CallbackRequestType; @@ -106,7 +107,7 @@ pub fn execute( .add_attribute("method", "execute") .add_message(IbcMsg::SendPacket { channel_id, - data: to_binary(&ibc::Packet { + data: to_json_binary(&ibc::Packet { sender: info.sender.into_string(), msg, }) @@ -118,18 +119,18 @@ pub fn execute( #[cfg_attr(not(feature = "library"), entry_point)] pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { match msg { - QueryMsg::ActiveChannel => to_binary(&CHANNEL.may_load(deps.storage)?), - QueryMsg::Pair => to_binary(&CONNECTION_REMOTE_PORT.may_load(deps.storage)?.map( + QueryMsg::ActiveChannel => to_json_binary(&CHANNEL.may_load(deps.storage)?), + QueryMsg::Pair => to_json_binary(&CONNECTION_REMOTE_PORT.may_load(deps.storage)?.map( |(connection_id, remote_port)| Pair { connection_id, remote_port, }, )), - QueryMsg::RemoteAddress { local_address } => to_binary(&accounts::query_account( + QueryMsg::RemoteAddress { local_address } => to_json_binary(&accounts::query_account( deps.storage, deps.api.addr_validate(&local_address)?, )?), - QueryMsg::BlockMaxGas => to_binary(&BLOCK_MAX_GAS.load(deps.storage)?), + QueryMsg::BlockMaxGas => to_json_binary(&BLOCK_MAX_GAS.load(deps.storage)?), } } diff --git a/contracts/main/note/src/tests.rs b/contracts/main/note/src/tests.rs index ea11d00..53b2b71 100644 --- a/contracts/main/note/src/tests.rs +++ b/contracts/main/note/src/tests.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{ testing::{mock_dependencies, mock_env, mock_info}, - to_binary, Uint64, WasmMsg, + to_json_binary, Uint64, WasmMsg, }; use crate::{ @@ -35,7 +35,7 @@ fn simple_note() { on_behalf_of: None, msgs: vec![WasmMsg::Execute { contract_addr: "some_addr".to_string(), - msg: to_binary("some_msg").unwrap(), + msg: to_json_binary("some_msg").unwrap(), funds: vec![], } .into()], diff --git a/contracts/main/proxy/src/contract.rs b/contracts/main/proxy/src/contract.rs index 6314337..99ed2ba 100644 --- a/contracts/main/proxy/src/contract.rs +++ b/contracts/main/proxy/src/contract.rs @@ -1,7 +1,7 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - to_binary, Binary, Deps, DepsMut, Env, MessageInfo, Reply, Response, StdResult, SubMsg, + to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Reply, Response, StdResult, SubMsg, SubMsgResponse, SubMsgResult, }; use cw2::set_contract_version; @@ -65,7 +65,7 @@ pub fn execute( #[cfg_attr(not(feature = "library"), entry_point)] pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { match msg { - QueryMsg::Instantiator {} => to_binary(&INSTANTIATOR.load(deps.storage)?), + QueryMsg::Instantiator {} => to_json_binary(&INSTANTIATOR.load(deps.storage)?), } } diff --git a/contracts/main/voice/src/contract.rs b/contracts/main/voice/src/contract.rs index aa6cd12..498f58a 100644 --- a/contracts/main/voice/src/contract.rs +++ b/contracts/main/voice/src/contract.rs @@ -1,8 +1,9 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - from_binary, instantiate2_address, to_binary, to_vec, Binary, CodeInfoResponse, ContractResult, - Deps, DepsMut, Env, MessageInfo, Response, StdResult, SubMsg, SystemResult, Uint64, WasmMsg, + from_json, instantiate2_address, to_json_binary, to_json_vec, Binary, CodeInfoResponse, + ContractResult, Deps, DepsMut, Env, MessageInfo, Response, StdResult, SubMsg, SystemResult, + Uint64, WasmMsg, }; use cw2::set_contract_version; @@ -59,12 +60,12 @@ pub fn execute( if info.sender != env.contract.address { Err(ContractError::NotSelf) } else { - let Packet { sender, msg } = from_binary(&data)?; + let Packet { sender, msg } = from_json(data)?; match msg { Msg::Query { msgs } => { let mut results = Vec::with_capacity(msgs.len()); for msg in msgs { - let query_result = deps.querier.raw_query(&to_vec(&msg)?); + let query_result = deps.querier.raw_query(&to_json_vec(&msg)?); let error = match query_result { SystemResult::Ok(ContractResult::Err(error)) => { format!("contract: {error}") @@ -119,7 +120,7 @@ pub fn execute( admin: None, code_id, label: format!("polytone-proxy {sender}"), - msg: to_binary(&polytone_proxy::msg::InstantiateMsg {})?, + msg: to_json_binary(&polytone_proxy::msg::InstantiateMsg {})?, funds: vec![], salt, }), @@ -132,7 +133,7 @@ pub fn execute( .add_submessage(SubMsg::reply_always( WasmMsg::Execute { contract_addr: proxy.into_string(), - msg: to_binary(&polytone_proxy::msg::ExecuteMsg::Proxy { + msg: to_json_binary(&polytone_proxy::msg::ExecuteMsg::Proxy { msgs, })?, funds: vec![], @@ -168,8 +169,8 @@ fn salt(local_connection: &str, counterparty_port: &str, remote_sender: &str) -> #[cfg_attr(not(feature = "library"), entry_point)] pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { match msg { - QueryMsg::BlockMaxGas => to_binary(&BLOCK_MAX_GAS.load(deps.storage)?), - QueryMsg::ProxyCodeId => to_binary(&PROXY_CODE_ID.load(deps.storage)?), + QueryMsg::BlockMaxGas => to_json_binary(&BLOCK_MAX_GAS.load(deps.storage)?), + QueryMsg::ProxyCodeId => to_json_binary(&PROXY_CODE_ID.load(deps.storage)?), } } diff --git a/contracts/main/voice/src/ibc.rs b/contracts/main/voice/src/ibc.rs index 6ef4407..8703b83 100644 --- a/contracts/main/voice/src/ibc.rs +++ b/contracts/main/voice/src/ibc.rs @@ -1,7 +1,7 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::entry_point; use cosmwasm_std::{ - from_binary, to_binary, DepsMut, Env, IbcBasicResponse, IbcChannelCloseMsg, + from_json, to_json_binary, DepsMut, Env, IbcBasicResponse, IbcChannelCloseMsg, IbcChannelConnectMsg, IbcChannelOpenMsg, IbcChannelOpenResponse, IbcPacketAckMsg, IbcPacketReceiveMsg, IbcPacketTimeoutMsg, IbcReceiveResponse, Never, Reply, Response, SubMsg, SubMsgResult, WasmMsg, @@ -94,7 +94,7 @@ pub fn ibc_packet_receive( id: REPLY_ACK, msg: WasmMsg::Execute { contract_addr: env.contract.address.into_string(), - msg: to_binary(&ExecuteMsg::Rx { + msg: to_json_binary(&ExecuteMsg::Rx { connection_id, counterparty_port: msg.packet.src.port_id, data: msg.packet.data, @@ -125,7 +125,7 @@ pub fn reply(_deps: DepsMut, _env: Env, msg: Reply) -> Result(&data) { + match from_json::(&data) { Ok(_) => Response::default().set_data(data), Err(e) => Response::default() .set_data(ack_fail(format!("unmarshalling callback data: ({e})"))), diff --git a/packages/polytone/src/ack.rs b/packages/polytone/src/ack.rs index 7d46ad5..a0203ad 100644 --- a/packages/polytone/src/ack.rs +++ b/packages/polytone/src/ack.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{from_json, to_binary, Binary, IbcAcknowledgement, SubMsgResponse, Uint64}; +use cosmwasm_std::{from_json, to_json_binary, Binary, IbcAcknowledgement, SubMsgResponse, Uint64}; pub use crate::callbacks::Callback; use crate::callbacks::{ErrorResponse, ExecutionResponse}; @@ -12,12 +12,12 @@ pub type Ack = Callback; /// Serializes an ACK-SUCCESS containing the provided data. pub fn ack_query_success(result: Vec) -> Binary { - to_binary(&Callback::Query(Ok(result))).unwrap() + to_json_binary(&Callback::Query(Ok(result))).unwrap() } /// Serializes an ACK-SUCCESS for a query that failed. pub fn ack_query_fail(message_index: Uint64, error: String) -> Binary { - to_binary(&Callback::Query(Err(ErrorResponse { + to_json_binary(&Callback::Query(Err(ErrorResponse { message_index, error, }))) @@ -26,7 +26,7 @@ pub fn ack_query_fail(message_index: Uint64, error: String) -> Binary { /// Serializes an ACK-SUCCESS for execution that succeeded. pub fn ack_execute_success(result: Vec, executed_by: String) -> Binary { - to_binary(&Callback::Execute(Ok(ExecutionResponse { + to_json_binary(&Callback::Execute(Ok(ExecutionResponse { result, executed_by, }))) @@ -35,12 +35,12 @@ pub fn ack_execute_success(result: Vec, executed_by: String) -> /// Serializes an ACK-SUCCESS for execution that failed. pub fn ack_execute_fail(error: String) -> Binary { - to_binary(&Callback::Execute(Err(error))).unwrap() + to_json_binary(&Callback::Execute(Err(error))).unwrap() } /// Serializes an ACK-FAIL containing the provided error. pub fn ack_fail(err: String) -> Binary { - to_binary(&Callback::FatalError(err)).unwrap() + to_json_binary(&Callback::FatalError(err)).unwrap() } /// Unmarshals an ACK from an acknowledgement returned by the SDK. If diff --git a/packages/polytone/src/callbacks.rs b/packages/polytone/src/callbacks.rs index ae91782..b35c10c 100644 --- a/packages/polytone/src/callbacks.rs +++ b/packages/polytone/src/callbacks.rs @@ -1,6 +1,6 @@ use cosmwasm_schema::cw_serde; use cosmwasm_std::{ - to_binary, Addr, Api, Binary, CosmosMsg, IbcPacketAckMsg, IbcPacketTimeoutMsg, StdResult, + to_json_binary, Addr, Api, Binary, CosmosMsg, IbcPacketAckMsg, IbcPacketTimeoutMsg, StdResult, Storage, SubMsgResponse, Uint64, WasmMsg, }; use cw_storage_plus::Map; @@ -178,7 +178,7 @@ fn callback_message(request: PendingCallback, result: Callback) -> CosmosMsg { } WasmMsg::Execute { contract_addr: request.receiver.into_string(), - msg: to_binary(&C::Callback(CallbackMessage { + msg: to_json_binary(&C::Callback(CallbackMessage { initiator: request.initiator, initiator_msg: request.initiator_msg, result, diff --git a/packages/polytone/src/handshake/mod.rs b/packages/polytone/src/handshake/mod.rs index d76506b..b7d256d 100644 --- a/packages/polytone/src/handshake/mod.rs +++ b/packages/polytone/src/handshake/mod.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{ - to_binary, Ibc3ChannelOpenResponse, IbcChannelOpenMsg, IbcChannelOpenResponse, IbcOrder, + to_json_binary, Ibc3ChannelOpenResponse, IbcChannelOpenMsg, IbcChannelOpenResponse, IbcOrder, }; use error::HandshakeError; @@ -59,7 +59,7 @@ fn open( Err(HandshakeError::ExpectUnordered) } else { Ok(Some(Ibc3ChannelOpenResponse { - version: to_binary(extensions).unwrap().to_base64(), + version: to_json_binary(extensions).unwrap().to_base64(), })) } } diff --git a/packages/polytone/src/handshake/note.rs b/packages/polytone/src/handshake/note.rs index 14f027a..90ad445 100644 --- a/packages/polytone/src/handshake/note.rs +++ b/packages/polytone/src/handshake/note.rs @@ -31,7 +31,7 @@ pub fn connect(msg: &IbcChannelConnectMsg, extensions: &[&str]) -> Result<(), Ha counterparty_version, } => { let proposed_version: Vec = - from_json(&Binary::from_base64(counterparty_version).unwrap()).unwrap(); + from_json(Binary::from_base64(counterparty_version).unwrap()).unwrap(); let subseteq_violation = extensions .iter() .find(|e| !proposed_version.contains(&e.to_string())); diff --git a/packages/polytone/src/handshake/voice.rs b/packages/polytone/src/handshake/voice.rs index 4809b8d..df533ac 100644 --- a/packages/polytone/src/handshake/voice.rs +++ b/packages/polytone/src/handshake/voice.rs @@ -31,7 +31,7 @@ pub fn connect(msg: &IbcChannelConnectMsg, extensions: &[&str]) -> Result<(), Ha counterparty_version, } => { let proposed_version: Vec = - from_json(&Binary::from_base64(counterparty_version).unwrap()).unwrap(); + from_json(Binary::from_base64(counterparty_version).unwrap()).unwrap(); let subseteq_violation = proposed_version .iter() .find(|e| !extensions.contains(&e.as_str()));