diff --git a/Cargo.lock b/Cargo.lock index 7c15040c17..f20051e8b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3477,7 +3477,7 @@ dependencies = [ "rand_chacha 0.3.1", "schemars", "serde", - "serde_json", + "serde-json-wasm", "serde_repr", "thiserror", "time 0.3.17", diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/Cargo.toml b/common/cosmwasm-smart-contracts/mixnet-contract/Cargo.toml index 670c993554..7dd3e6db58 100644 --- a/common/cosmwasm-smart-contracts/mixnet-contract/Cargo.toml +++ b/common/cosmwasm-smart-contracts/mixnet-contract/Cargo.toml @@ -10,13 +10,15 @@ repository = { workspace = true } [dependencies] bs58 = "0.4.0" -cosmwasm-std = "1.0.0" +cosmwasm-std = "=1.0.0" serde = { version = "1.0", features = ["derive"] } serde_repr = "0.1" schemars = "0.8" thiserror = "1.0" contracts-common = { path = "../contracts-common", package = "nym-contracts-common", version = "0.2.0" } -serde_json = "1.0.0" +# use 0.4.1 as that's the version used by cosmwasm-std 1.0.0 +# (and ideally we don't want to pull the same dependency twice) +serde-json-wasm = "=0.4.1" humantime-serde = "1.1.1" # TO CHECK WHETHER STILL NEEDED: diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/src/gateway.rs b/common/cosmwasm-smart-contracts/mixnet-contract/src/gateway.rs index 3ba030a5b3..550660b8eb 100644 --- a/common/cosmwasm-smart-contracts/mixnet-contract/src/gateway.rs +++ b/common/cosmwasm-smart-contracts/mixnet-contract/src/gateway.rs @@ -128,7 +128,7 @@ pub struct GatewayConfigUpdate { impl GatewayConfigUpdate { pub fn to_inline_json(&self) -> String { - serde_json::to_string(self).unwrap_or_else(|_| "serialisation failure".into()) + serde_json_wasm::to_string(self).unwrap_or_else(|_| "serialisation failure".into()) } } diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/src/mixnode.rs b/common/cosmwasm-smart-contracts/mixnet-contract/src/mixnode.rs index 90dacbea30..b2f98f3259 100644 --- a/common/cosmwasm-smart-contracts/mixnet-contract/src/mixnode.rs +++ b/common/cosmwasm-smart-contracts/mixnet-contract/src/mixnode.rs @@ -542,7 +542,7 @@ pub struct MixNodeCostParams { impl MixNodeCostParams { pub fn to_inline_json(&self) -> String { - serde_json::to_string(self).unwrap_or_else(|_| "serialisation failure".into()) + serde_json_wasm::to_string(self).unwrap_or_else(|_| "serialisation failure".into()) } } @@ -636,7 +636,7 @@ pub struct MixNodeConfigUpdate { impl MixNodeConfigUpdate { pub fn to_inline_json(&self) -> String { - serde_json::to_string(self).unwrap_or_else(|_| "serialisation failure".into()) + serde_json_wasm::to_string(self).unwrap_or_else(|_| "serialisation failure".into()) } } diff --git a/common/cosmwasm-smart-contracts/mixnet-contract/src/reward_params.rs b/common/cosmwasm-smart-contracts/mixnet-contract/src/reward_params.rs index 713a70468b..74777eb99f 100644 --- a/common/cosmwasm-smart-contracts/mixnet-contract/src/reward_params.rs +++ b/common/cosmwasm-smart-contracts/mixnet-contract/src/reward_params.rs @@ -70,7 +70,7 @@ pub struct IntervalRewardParams { impl IntervalRewardParams { pub fn to_inline_json(&self) -> String { - serde_json::to_string(self).unwrap_or_else(|_| "serialisation failure".into()) + serde_json_wasm::to_string(self).unwrap_or_else(|_| "serialisation failure".into()) } } @@ -282,6 +282,6 @@ impl IntervalRewardingParamsUpdate { } pub fn to_inline_json(&self) -> String { - serde_json::to_string(self).unwrap_or_else(|_| "serialisation failure".into()) + serde_json_wasm::to_string(self).unwrap_or_else(|_| "serialisation failure".into()) } } diff --git a/nym-wallet/Cargo.lock b/nym-wallet/Cargo.lock index 2c1cdd58d5..4b78f3ee05 100644 --- a/nym-wallet/Cargo.lock +++ b/nym-wallet/Cargo.lock @@ -2912,7 +2912,7 @@ dependencies = [ "nym-contracts-common", "schemars", "serde", - "serde_json", + "serde-json-wasm", "serde_repr", "thiserror", "time",