diff --git a/backend/canisters/neuron_controller/CHANGELOG.md b/backend/canisters/neuron_controller/CHANGELOG.md index 1119db7a35..e21c59796d 100644 --- a/backend/canisters/neuron_controller/CHANGELOG.md +++ b/backend/canisters/neuron_controller/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [unreleased] +## [[2.0.994](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.994-neuron_controller)] - 2024-01-03 + ### Added - One time job to transfer ICP from NeuronController to OpenChat treasury ([#5106](https://github.com/open-chat-labs/open-chat/pull/5106)) diff --git a/backend/canisters/neuron_controller/impl/src/lifecycle/post_upgrade.rs b/backend/canisters/neuron_controller/impl/src/lifecycle/post_upgrade.rs index 1016df81a4..f16bde16ad 100644 --- a/backend/canisters/neuron_controller/impl/src/lifecycle/post_upgrade.rs +++ b/backend/canisters/neuron_controller/impl/src/lifecycle/post_upgrade.rs @@ -1,17 +1,12 @@ -use crate::ecdsa::make_canister_call_via_ecdsa; 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 icrc_ledger_types::icrc1::account::Account; -use icrc_ledger_types::icrc1::transfer::TransferArg; use neuron_controller_canister::post_upgrade::Args; use stable_memory::get_reader; -use std::time::Duration; use tracing::info; -use utils::consts::SNS_GOVERNANCE_CANISTER_ID; use utils::cycles::init_cycles_dispenser_client; #[post_upgrade] @@ -29,25 +24,4 @@ fn post_upgrade(args: Args) { init_state(env, data, args.wasm_version); info!(version = %args.wasm_version, "Post-upgrade complete"); - - ic_cdk_timers::set_timer(Duration::ZERO, || ic_cdk::spawn(transfer_to_treasury())); -} - -async fn transfer_to_treasury() { - let request = mutate_state(|state| { - state.prepare_canister_call_via_ecdsa( - state.data.nns_ledger_canister_id, - "icrc1_transfer".to_string(), - &TransferArg { - from_subaccount: None, - to: Account::from(SNS_GOVERNANCE_CANISTER_ID), - fee: Some(10000u64.into()), - created_at_time: None, - memo: None, - amount: 258592708008u64.into(), - }, - ) - }); - - let _ = make_canister_call_via_ecdsa(request).await; } diff --git a/canister_commit_ids.json b/canister_commit_ids.json index 6af803d948..9e32c97bf1 100644 --- a/canister_commit_ids.json +++ b/canister_commit_ids.json @@ -6,7 +6,7 @@ "local_group_index": "2914f73daa7a4d7b76cfbaf5b89b0df740443ffa", "local_user_index": "2914f73daa7a4d7b76cfbaf5b89b0df740443ffa", "market_maker": "2914f73daa7a4d7b76cfbaf5b89b0df740443ffa", - "neuron_controller": "c2fe97421a574ce0f0e04b216d6985d9260481b9", + "neuron_controller": "433fd8960b7768f25fd42cdd84906ddb763383a6", "notifications": "91512f09ac773c85622fa84a7ea602d4273dcc8b", "notifications_index": "91512f09ac773c85622fa84a7ea602d4273dcc8b", "online_users": "2914f73daa7a4d7b76cfbaf5b89b0df740443ffa",