Skip to content

Commit

Permalink
Fix empty ic_root_key (#6134)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Jul 29, 2024
1 parent cac3516 commit 2a6b1dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions backend/canisters/user_index/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

- Register the AirdropBot user ([#6129](https://github.com/open-chat-labs/open-chat/pull/6129))

### Fixed

- Fix empty `ic_root_key` ([#6134](https://github.com/open-chat-labs/open-chat/pull/6134))

## [[2.0.1258](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1258-user_index)] - 2024-07-26

### Added
Expand Down
7 changes: 6 additions & 1 deletion backend/canisters/user_index/impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use types::{
};
use utils::canister::{CanistersRequiringUpgrade, FailedUpgradeCount};
use utils::canister_event_sync_queue::CanisterEventSyncQueue;
use utils::consts::DEV_TEAM_DFX_PRINCIPAL;
use utils::consts::{DEV_TEAM_DFX_PRINCIPAL, IC_ROOT_KEY};
use utils::env::Environment;
use utils::time::{MonthKey, DAY_IN_MS};

Expand Down Expand Up @@ -318,10 +318,15 @@ struct Data {
pub empty_users: HashSet<UserId>,
pub chit_leaderboard: ChitLeaderboard,
pub deleted_users: Vec<DeletedUser>,
#[serde(with = "serde_bytes", skip_deserializing, default = "ic_root_key")]
pub ic_root_key: Vec<u8>,
pub identity_canister_user_sync_queue: VecDeque<(Principal, Option<UserId>)>,
}

fn ic_root_key() -> Vec<u8> {
IC_ROOT_KEY.to_vec()
}

fn init_airdrop_bot_canister_id() -> CanisterId {
Principal::from_text("62rh2-kiaaa-aaaaf-bmy5q-cai").unwrap()
}
Expand Down

0 comments on commit 2a6b1dd

Please sign in to comment.