Skip to content

Commit

Permalink
fix upgrading governance canister with custom wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
ravi-sawlani-yral committed Dec 11, 2024
1 parent c210d98 commit 8731e8a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/canister/upgrade_user_token_sns_canister.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8731e8a

Please sign in to comment.