Skip to content

Commit

Permalink
Post release
Browse files Browse the repository at this point in the history
  • Loading branch information
megrogan committed Jun 24, 2024
1 parent ff89dc3 commit fed2fcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
2 changes: 2 additions & 0 deletions backend/canisters/user/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.1213](https://github.com/open-chat-labs/open-chat/releases/tag/v2.0.1213-user)] - 2024-06-24

### Changed

- Debug potential swap slippage for single user ([#5957](https://github.com/open-chat-labs/open-chat/pull/5957))
Expand Down
18 changes: 0 additions & 18 deletions backend/canisters/user/impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,22 +147,6 @@ impl RuntimeState {
}

pub fn metrics(&self) -> Metrics {
// TODO: Remove token_swaps from Metrics after next release
let mut token_swaps: Vec<TokenSwap> = Vec::new();
let my_user_id: UserId = self.env.canister_id().into();
let debug_user: UserId = Principal::from_text("pzg6u-5qaaa-aaaar-azjpa-cai").unwrap().into();

if my_user_id == debug_user {
// Show swaps from 2024/06/06 12:00 to 2024/06/07 12:00
token_swaps = self
.data
.token_swaps
.iter()
.filter(|ts| ts.started > 1717671600000 && ts.started < 1717758000000)
.cloned()
.collect();
}

Metrics {
heap_memory_used: utils::memory::heap(),
stable_memory_used: utils::memory::stable(),
Expand All @@ -188,7 +172,6 @@ impl RuntimeState {
escrow: self.data.escrow_canister_id,
icp_ledger: Cryptocurrency::InternetComputer.ledger_canister_id().unwrap(),
},
token_swaps,
}
}
}
Expand Down Expand Up @@ -353,7 +336,6 @@ pub struct Metrics {
pub video_call_operators: Vec<Principal>,
pub timer_jobs: u32,
pub canister_ids: CanisterIds,
pub token_swaps: Vec<TokenSwap>,
}

fn run_regular_jobs() {
Expand Down

0 comments on commit fed2fcc

Please sign in to comment.