diff --git a/backend/canisters/group_index/CHANGELOG.md b/backend/canisters/group_index/CHANGELOG.md index 02e5fc083b..40e0a2b33c 100644 --- a/backend/canisters/group_index/CHANGELOG.md +++ b/backend/canisters/group_index/CHANGELOG.md @@ -11,7 +11,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Handle retry attempts when adding a new LocalGroupIndex ([#7091](https://github.com/open-chat-labs/open-chat/pull/7091)) - Add logging + skip steps that have already been completed ([#7093](https://github.com/open-chat-labs/open-chat/pull/7093)) -## [[2.0.1519](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1519-group_index)] - 2024-12-19 +### Fixed + +- Set `wasm_hash` field which was previously empty ([#7097](https://github.com/open-chat-labs/open-chat/pull/7097)) + +## [[2.0.1528](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1528-group_index)] - 2024-12-19 ### Changed diff --git a/backend/canisters/user_index/CHANGELOG.md b/backend/canisters/user_index/CHANGELOG.md index 136cc9890c..7a01532bd2 100644 --- a/backend/canisters/user_index/CHANGELOG.md +++ b/backend/canisters/user_index/CHANGELOG.md @@ -11,6 +11,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Add logging + skip steps that have already been completed ([#7093](https://github.com/open-chat-labs/open-chat/pull/7093)) - Change bot cmd number param values from u16 to f64 ([#7095](https://github.com/open-chat-labs/open-chat/pull/7095)) +### Fixed + +- Set `wasm_hash` field which was previously empty ([#7097](https://github.com/open-chat-labs/open-chat/pull/7097)) + ## [[2.0.1537](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1537-user_index)] - 2024-12-19 ### Changed diff --git a/backend/libraries/types/src/canister_wasm.rs b/backend/libraries/types/src/canister_wasm.rs index 53fb159d5f..8e19e782dd 100644 --- a/backend/libraries/types/src/canister_wasm.rs +++ b/backend/libraries/types/src/canister_wasm.rs @@ -28,12 +28,29 @@ pub enum UpgradeChunkedCanisterWasmResponse { } #[derive(CandidType, Serialize, Deserialize, Clone, Default)] +#[serde(from = "ChunkedCanisterWasmPrevious")] pub struct ChunkedCanisterWasm { pub wasm: CanisterWasm, pub chunks: Vec, pub wasm_hash: Hash, } +#[derive(Deserialize)] +pub struct ChunkedCanisterWasmPrevious { + pub wasm: CanisterWasm, + pub chunks: Vec, +} + +impl From for ChunkedCanisterWasm { + fn from(value: ChunkedCanisterWasmPrevious) -> Self { + ChunkedCanisterWasm { + wasm_hash: value.wasm.module.hash(), + wasm: value.wasm, + chunks: value.chunks, + } + } +} + impl From for ChunkedCanisterWasm { fn from(value: CanisterWasm) -> Self { ChunkedCanisterWasm {