Skip to content

Commit

Permalink
feat: update custodian in upgrade script
Browse files Browse the repository at this point in the history
  • Loading branch information
agustinustheo committed Aug 15, 2024
1 parent 4f13ff0 commit ab19ba8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/icp_subaccount_indexer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,15 @@ fn reconstruct_network() {
#[ic_cdk::post_upgrade]
async fn post_upgrade() {
ic_cdk::println!("running post_upgrade...");

let custodian_principal =
Principal::from_text("custodian_principal").expect("Invalid custodian principal");

CUSTODIAN_PRINCIPAL.with(|principal_ref| {
let stored_principal = StoredPrincipal::new(custodian_principal);
let _ = principal_ref.borrow_mut().set(stored_principal);
});

reconstruct_subaccounts();
reconstruct_network();
}
Expand Down

0 comments on commit ab19ba8

Please sign in to comment.