Skip to content

Commit

Permalink
Update Registry post release (#5182)
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles authored Jan 16, 2024
1 parent 6b85443 commit e78c053
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 2 additions & 0 deletions backend/canisters/registry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [unreleased]

## [[2.0.1005](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1005-registry)] - 2024-01-15

### Fixed

- Update Windoge98 transaction fee ([#5176](https://github.com/open-chat-labs/open-chat/pull/5176))
Expand Down
11 changes: 1 addition & 10 deletions backend/canisters/registry/impl/src/lifecycle/post_upgrade.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
use crate::lifecycle::{init_env, init_state};
use crate::memory::get_upgrades_memory;
use crate::{mutate_state, Data};
use crate::Data;
use canister_logger::LogEntry;
use canister_tracing_macros::trace;
use ic_cdk_macros::post_upgrade;
use registry_canister::post_upgrade::Args;
use stable_memory::get_reader;
use tracing::info;
use types::CanisterId;
use utils::cycles::init_cycles_dispenser_client;

#[post_upgrade]
Expand All @@ -25,12 +24,4 @@ fn post_upgrade(args: Args) {
init_state(env, data, args.wasm_version);

info!(version = %args.wasm_version, "Post-upgrade complete");

mutate_state(|state| {
state.data.tokens.set_fee(
CanisterId::from_text("rh2pm-ryaaa-aaaan-qeniq-cai").unwrap(),
100_000,
state.env.now(),
)
});
}
1 change: 1 addition & 0 deletions backend/canisters/registry/impl/src/model/tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ impl Tokens {
}
}

#[allow(dead_code)]
pub fn set_fee(&mut self, ledger_canister_id: CanisterId, fee: u128, now: TimestampMillis) {
if let Some(token) = self.tokens.iter_mut().find(|t| t.ledger_canister_id == ledger_canister_id) {
if token.fee != fee {
Expand Down
2 changes: 1 addition & 1 deletion canister_commit_ids.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"online_users": "2914f73daa7a4d7b76cfbaf5b89b0df740443ffa",
"proposals_bot": "4d848f77c3060d6bdb1b3709053ed5ac8597dac6",
"proposal_validation": "03647d5475bd4cb1b6299c5688e6d4f97928559a",
"registry": "bbb042f371487caa60ae90d0af70b4a8cc51c668",
"registry": "88db8072b57cce348771eacb1cf53ad2a7dec9b6",
"storage_bucket": "d000cb13d031463e1c2938cf725e7102c98171b7",
"storage_index": "d000cb13d031463e1c2938cf725e7102c98171b7",
"user": "5118c7f4214b96006b9a06af4c3bcb2f84a0dfea",
Expand Down

0 comments on commit e78c053

Please sign in to comment.