diff --git a/contracts/ibc_transfer/Cargo.toml b/contracts/ibc_transfer/Cargo.toml index 1fa88529..260b8f22 100644 --- a/contracts/ibc_transfer/Cargo.toml +++ b/contracts/ibc_transfer/Cargo.toml @@ -37,7 +37,6 @@ cosmwasm-std = { version = "1.3.0", features = ["staking", "stargate"] } cw2 = "1.1.0" schemars = "0.8.10" serde = { version = "1.0.149", default-features = false, features = ["derive"] } -serde-json-wasm = { version = "0.5.1" } cw-storage-plus = { version = "1.1.0", features = ["iterator"]} neutron-sdk = { path = "../../packages/neutron-sdk", default-features = false, version = "0.6.1"} protobuf = { version = "3.3.0", features = ["with-bytes"] } diff --git a/contracts/ibc_transfer/src/contract.rs b/contracts/ibc_transfer/src/contract.rs index d567a919..6afca24d 100644 --- a/contracts/ibc_transfer/src/contract.rs +++ b/contracts/ibc_transfer/src/contract.rs @@ -1,6 +1,6 @@ use cosmwasm_std::{ - coin, entry_point, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Reply, Response, - StdError, StdResult, SubMsg, + coin, entry_point, from_binary, Binary, CosmosMsg, Deps, DepsMut, Env, MessageInfo, Reply, + Response, StdError, StdResult, SubMsg, }; use cw2::set_contract_version; use neutron_sdk::{ @@ -112,13 +112,12 @@ fn msg_with_sudo_callback>, T>( // and process this payload when an acknowledgement for the SubmitTx message is received in Sudo handler fn prepare_sudo_payload(mut deps: DepsMut, _env: Env, msg: Reply) -> StdResult { let payload = read_reply_payload(deps.storage, msg.id)?; - let resp: MsgIbcTransferResponse = serde_json_wasm::from_slice( - msg.result + let resp: MsgIbcTransferResponse = from_binary( + &msg.result .into_result() .map_err(StdError::generic_err)? .data - .ok_or_else(|| StdError::generic_err("no result"))? - .as_slice(), + .ok_or_else(|| StdError::generic_err("no result"))?, ) .map_err(|e| StdError::generic_err(format!("failed to parse response: {:?}", e)))?; let seq_id = resp.sequence_id;