From 8731e8af2731e361a2ec876b518857ff90b91294 Mon Sep 17 00:00:00 2001 From: ravibazz Date: Wed, 11 Dec 2024 10:32:22 +0530 Subject: [PATCH] fix upgrading governance canister with custom wasm --- src/canister/upgrade_user_token_sns_canister.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/canister/upgrade_user_token_sns_canister.rs b/src/canister/upgrade_user_token_sns_canister.rs index 06b8c81..6cf96ec 100644 --- a/src/canister/upgrade_user_token_sns_canister.rs +++ b/src/canister/upgrade_user_token_sns_canister.rs @@ -22,7 +22,13 @@ use yral_canisters_client::{ user_index::UserIndex, }; -use ic_utils::{interfaces::management_canister::ManagementCanister, Canister}; +use ic_utils::{ + interfaces::management_canister::{ + builders::{CanisterUpgradeOptions, InstallMode}, + ManagementCanister, + }, + Canister, +}; use crate::{consts::PLATFORM_ORCHESTRATOR_ID, qstash::client::QStashClient}; @@ -203,6 +209,7 @@ async fn upgrade_sns_governance_canister_with_custom_wasm( let upgrade_result = management_canister .install_code(&governance_canister_id, custom_governance_wasm) + .with_mode(InstallMode::Upgrade(None)) .with_arg(governance_init_payload) .build()? .await