From eff2c05e0204500e9d72fb20ee4f5fc8720a61cc Mon Sep 17 00:00:00 2001 From: Max Strasinsky <98811342+mstrasinskis@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:41:37 +0100 Subject: [PATCH] Update voting power description (#6010) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The periodic confirmation will change the calculation of voting power. To make it transparent to the user, we are updating the description information on the neuron details page. **Note:** The backend now provides two new fields for the neuron: - `potentialVotingPower` (maximum possible value) - `decidingVotingPower` (adjusted based on the neuron's activity). In this PR, we update only the description, not the rendered voting power value. - Add `activityMultiplier` util. - Display voting power description with activity multiplier. - Added. - Tested manually: | Before | After | |--------|--------| | image | image | - [ ] Add entry to changelog (if necessary). Not necessary. bot: Update IC Cargo Dependencies to release-2024-12-06_03-16-base (#6014) A newer release of the internet computer is available. We want to keep our Cargo dependencies up to date. * Ran `scripts/update-ic-cargo-deps` to update the Cargo.toml dependencies to the latest IC release. * See CI Co-authored-by: gix-bot Update snsdemo to release-2024-12-11 (#6015) [The automatic update](https://github.com/dfinity/nns-dapp/pull/6009) had test failure. It appears that the ckBTC checker, which replaces the KYT canister (see https://github.com/dfinity/snsdemo/pull/427 and https://github.com/dfinity/snsdemo/pull/435), has lower fees. 1. Update the snsdemo release. 2. Update the end-to-end test that failed in the automatic update. Updated - [ ] Add entry to changelog (if necessary). not necessary --------- Co-authored-by: gix-bot Update changelog after release (#6016) A release has been deployed to production. - Changelog - split out the changes included in the release. - Increment the patch version of the nns-dapp. Add stakeInUsd field to TableNeuron (#6017) We want to show USD values in the neurons tables, similar to the tokens table and the projects table. In this PR we just add the USD stake to the `TableNeuron` objects. It will be displayed in future PRs. 1. Add `stakeInUsd` field to `TableNeuron` type. 2. Populate `stakeInUsd` in and `tableNeuronsFromNeuronInfos` and `tableNeuronsFromSnsNeurons`. 3. Make `icpSwapUsdPrices` temporarily an optional parameter until we pass it from all the components callers in future PRs. Then they will be tested too. 1. Unit tests adapted. 2. Tested manually (including future changes) at https://qsgjb-riaaa-aaaaa-aaaga-cai.dskloet-ingress.devenv.dfinity.network/neurons/?u=qsgjb-riaaa-aaaaa-aaaga-cai - [ ] Add entry to changelog (if necessary). not yet refactor: types toast messages (#6012) We want to define the types of potential messages that can be passed to the `toast` store. We can extract this list of potential messages from `I18n`. https://github.com/user-attachments/assets/17c7d582-bf7b-42f4-b873-8aee9c2919a5 We can't enforce just `I18n` keys as we have some places were we programmatically pass the value and we don't have control on the type. - Types `labelKey` based on `I18n` nested keys. - Not necessary - [ ] Add entry to changelog (if necessary). Not necessary Support rendering stake in USD in NeuronsTable (#6018) We want to show USD values in the neurons tables, similar to the tokens table and the projects table. This PR adds support for rendering the `stakeInUsd` field in the `NeuronsTable` components. Still missing (for future PRs): 1. Passing `icpSwapUsdPrices` to `tableNeuronsFromNeuronInfos` and `tableNeuronsFromSnsNeurons`. 2. Calling `loadIcpSwapTickers` on the neurons table page to make sure data is available. 1. Render stake in USD in `NeuronStakeCell.svelte` if `ENABLE_USD_VALUES_FOR_NEURONS` is enabled. 1. Unit tests added. 2. Manually at https://qsgjb-riaaa-aaaaa-aaaga-cai.dskloet-ingress.devenv.dfinity.network/neurons/?u=qsgjb-riaaa-aaaaa-aaaga-cai - [ ] Add entry to changelog (if necessary). not yet feat: filters icp ledger transactions based on range if provided (#5991) Users can select a date range before generating a report. We need to filter the results in the front end and stop fetching pages if we exceed the `from` date. The ledger canister returns transactions sorted by date, with the newest transaction listed first and the oldest transaction listed last. ``` Present Past (now) (t) 0-----------------------[TO]-----------------[FROM]--------------------------->t | | | | | | | | Current time Newer limit Older limit Earliest transaction - Transactions BETWEEN 'from' and 'to' are included - Transactions NEWER than 'from' are excluded - Transactions OLDER than 'to' are excluded ``` - Extends `getAllTransactionsFromAccountAndIdentity` to accept a date range for filtering results and to stop fetching. - Unit tests - [ ] Add entry to changelog (if necessary). Not necessary build: bump testing-library to latest (#6025) Since I'm migrating to Svelte v5 (#6020) and aiming for consistent status across our repo, bumping these two libraries align with OISY. - `npm rm @testing-library/jest-dom @testing-library/svelte && npm i @testing-library/jest-dom @testing-library/svelte -D` Signed-off-by: David Dal Busco fix: cannot be a child of