Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit ec81b0a Author: David de Kloet <[email protected]> Date: Fri May 24 09:07:52 2024 +0200 Remove data-title from TokensTableRow (#4911) # Motivation Having an attribute on the `TokensTableRow` which is specific to the tokens data makes it more difficult to make the table generic so it can be reused for the neurons table. This attribute was only used for testing. # Changes 1. Remove `data-title` attribute. 2. Instead of using the `data-title` attribute to find a specific row, iterate over the rows and return the one that matches. 3. Use `await` where necessary because the method now has to be async. # Tests Pass # Todos - [ ] Add entry to changelog (if necessary). not necessary commit 46ab6e3 Author: sa-github-api <[email protected]> Date: Fri May 24 08:25:13 2024 +0200 Update snsdemo to release-2024-05-22 (#4913) # Motivation We would like to keep the testing environment, provided by snsdemo, up to date. # Changes * Updated `snsdemo` version in `dfx.json`. * Ensured that the `dfx` version in `dfx.json` matches `snsdemo`. # Tests CI should pass. Co-authored-by: gix-bot <[email protected]> commit 87df248 Author: David de Kloet <[email protected]> Date: Thu May 23 15:15:07 2024 +0200 Downgrade rust from 1.78 to 1.77 (#4910) # Motivation There is a bug in Rust 1.78: rustwasm/wasm-bindgen#3801 I'm not sure if it affects us but better safe than sorry. # Changes Go back to the version of Rust (1.77.2) we were using before #4822 # Tests CI # Todos - [x] Add entry to changelog (if necessary). commit 4b8179b Author: David de Kloet <[email protected]> Date: Thu May 23 14:33:42 2024 +0200 Extract cell components from TokensTableRow (#4909) # Motivation We want to try to reuse the tokens table structure and style for the neurons table. The `TokensTable` component is currently very specific to the tokens table. By extracting tokens specific subcomponents, I'm hoping to separate the generic table structure from the tokens specific rendering. And this should make it easier to subsequently create a generic table component and use that for both the tokens table and the neurons table. # Changes 1. Create `TokenTitleCell`, `TokenBalanceCell` and `TokenActionsCell` component. 2. Use those components in `TokensTableRow.svelte` # Tests All tokens table functionality continues to be covered by `src/tests/lib/components/tokens/TokensTable.spec.ts`. # Todos - [ ] Add entry to changelog (if necessary). not necessary commit aeaaf8b Author: David de Kloet <[email protected]> Date: Thu May 23 13:23:31 2024 +0200 Remove existing environment in env-vars.utils.spec.ts (#4908) # Motivation Unit tests can depend on environment variables set in `frontend/.env` which can be different depending on how `./config.sh` is run. In `frontend/src/tests/lib/utils/env-vars.utils.spec.ts` we stub out environment variables that we expect to read, but additional environment variables could potentially affect the test as well. Currently, the following ``` DFX_NETWORK=mainnet ./config.sh npm run test -- env-vars ``` fails with ``` FAIL src/tests/lib/utils/env-vars.utils.spec.ts > env-vars-utils > TVL canister ID is not mandatory AssertionError: expected { …(20) } to deeply equal { …(18) } - Expected + Received Object { "ckbtcIndexCanisterId": "olzyh-buaaa-aaaaa-qabga-cai", "ckbtcLedgerCanisterId": "oz7p6-neaaa-aaaaa-qabfa-cai", "ckbtcMinterCanisterId": "o66jk-a4aaa-aaaaa-qabfq-cai", "ckethIndexCanisterId": "of3vp-2eaaa-aaaaa-qabha-cai", "ckethLedgerCanisterId": "omy6t-mmaaa-aaaaa-qabgq-cai", + "ckusdcIndexCanisterId": "xrs4b-hiaaa-aaaar-qafoa-cai", + "ckusdcLedgerCanisterId": "xevnm-gaaaa-aaaar-qafnq-cai", "cyclesMintingCanisterId": "rkp4c-7iaaa-aaaaa-aaaca-cai", "dfxNetwork": "local", "featureFlags": "{\"ENABLE_CKBTC\":true,\"ENABLE_CKTESTBTC\":false,\"ENABLE_SNS\":true,\"ENABLE_SNS_2\":true,\"ENABLE_VOTING_INDICATION\":false}", "fetchRootKey": "true", "governanceCanisterId": "rrkah-fqaaa-aaaaa-aaaaq-cai", "host": "http://localhost:8080", "identityServiceUrl": "http://qhbym-qaaaa-aaaaa-aaafq-cai.localhost:8080", "indexCanisterId": "mecbw-6maaa-aaaaa-qabkq-cai", "ledgerCanisterId": "ryjl3-tyaaa-aaaaa-aaaba-cai", "ownCanisterId": "qsgjb-riaaa-aaaaa-aaaga-cai", "snsAggregatorUrl": "http://bd3sg-teaaa-aaaaa-qaaba-cai.localhost:8080", "tvlCanisterId": undefined, "wasmCanisterId": "qaa6y-5yaaa-aaaaa-aaafa-cai", } ❯ src/tests/lib/utils/env-vars.utils.spec.ts:116:26 114| it("TVL canister ID is not mandatory", () => { 115| vi.stubEnv("VITE_TVL_CANISTER_ID", ""); 116| expect(getEnvVars()).toEqual({ | ^ 117| ...defaultExpectedEnvVars, 118| tvlCanisterId: undefined, ⎯⎯⎯⎯ ``` # Changes In `frontend/src/tests/lib/utils/env-vars.utils.spec.ts` unset all existing environment variables before stubbing a specific set of variables. # Tests Ran ``` DFX_NETWORK=mainnet ./config.sh npm run test -- env-vars ``` which fails before this change and passes after. # Todos - [ ] Add entry to changelog (if necessary). not necessary commit b4daed2 Author: Max Strasinsky <[email protected]> Date: Thu May 23 09:35:42 2024 +0200 Snses without actionables banner (#4902) # Motivation Because not all projects support actionable proposals (return neuron ballots), not all actionable proposals will be shown on the actionable proposals page. To make it clear that there could be more votable proposals, we display a banner with a list of projects that do not have actionable support. In this PR, we create a banner component that will be shown on the actionable proposals page. # Changes - Add new component `ActionableProposalsNotSupportedSnses` # Tests - PO for `ActionableProposalsNotSupportedSnses` - Tests for `ActionableProposalsNotSupportedSnses` # Todos - [ ] Add entry to changelog (if necessary). not yet. # Screenshot <img width="1325" alt="image" src="https://github.com/dfinity/nns-dapp/assets/98811342/ab1fbcf6-0f6e-4a8f-ac69-cb79fe990808"> commit 37633d0 Author: sa-github-api <[email protected]> Date: Thu May 23 08:37:07 2024 +0200 Update SNS Aggregator Response (#4906) # Motivation We would like to keep the ProdLaunchpad.spec up to date with mainnet data. # Changes * Update the files used for the fetch mock in ProdLaunchpad.spec. # Tests Only test changes. Co-authored-by: gix-bot <[email protected]> commit e25ade4 Author: David de Kloet <[email protected]> Date: Wed May 22 17:35:52 2024 +0200 Remove outdated comment (#4904) # Motivation In the `TokensTableRow` component there is a comment explaining why we duplicate the actions. But we don't actually duplicate the actions so this comment shouldn't be there. # Changes Remove the comment. # Tests I checked with @lmuntaner who added it. # Todos - [ ] Add entry to changelog (if necessary). not necessary commit 943ed15 Author: David de Kloet <[email protected]> Date: Wed May 22 12:47:52 2024 +0200 Set mainnet ckUSDC canister IDs (#4903) # Motivation We need the canister IDs to support ckUSDC in NNS dapp. I got these canister IDs from: ``` $ dfx canister --network ic call vxkom-oyaaa-aaaar-qafda-cai get_orchestrator_info ( record { cycles_management = record { cycles_top_up_increment = 10_000_000_000_000 : nat; cycles_for_ledger_creation = 150_000_000_000_000 : nat; cycles_for_archive_creation = 50_000_000_000_000 : nat; cycles_for_index_creation = 100_000_000_000_000 : nat; }; managed_canisters = vec { record { erc20_contract = record { chain_id = 1 : nat; address = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"; }; ledger = opt variant { Installed = record { canister_id = principal "xevnm-gaaaa-aaaar-qafnq-cai"; installed_wasm_hash = "4ca82938d223c77909dcf594a49ea72c07fd513726cfa7a367dd0be0d6abc679"; } }; index = opt variant { Installed = record { canister_id = principal "xrs4b-hiaaa-aaaar-qafoa-cai"; installed_wasm_hash = "55dd5ea22b65adf877cea893765561ae290b52e7fdfdc043b5c18ffbaaa78f33"; } }; archives = vec {}; ckerc20_token_symbol = "ckUSDC"; }; }; more_controller_ids = vec { principal "r7inp-6aaaa-aaaaa-aaabq-cai" }; minter_id = opt principal "sv3dd-oaaaa-aaaar-qacoa-cai"; }, ) ``` # Changes 1. Add `ckusdc_ledger` and `ckusdc_index` canister IDs for `mainnet` and `app` networks. 2. Ran `scripts/nns-dapp/test-config --update`. # Tests Deployed with https://github.com/dfinity/nns-dapp/actions/workflows/deploy-to-app.yaml for testing. # Todos - [ ] Add entry to changelog (if necessary). covered by existing entry commit 0b71a2c Author: Max Strasinsky <[email protected]> Date: Wed May 22 09:11:39 2024 +0200 Select universe card all actionable mode (#4901) # Motivation For select "all actionable proposals" we need to have a universe card with the "Vote" icon and static text. To maintain the original universe card’s styles and functionality, we extended the existing SelectUniverseCard component rather than creating a new one. # Changes - Extend `SelectUniverseCard` to display a "Actionable proposals" card. # Tests - Extended. <img width="273" alt="image" src="https://github.com/dfinity/nns-dapp/assets/98811342/11e4e564-9e47-4c39-8e2f-f4e35b2be067"> # Todos - [ ] Add entry to changelog (if necessary). Not yet. commit ed2f186 Author: David de Kloet <[email protected]> Date: Tue May 21 19:40:38 2024 +0200 NNS1-2905: Remove transactions fields from accounts (step 2) (#4836) This PR should only be merged after we have a release on mainnet containing #4800. The commit currently on mainnet: ``` $ dfx canister metadata nns-dapp git_commit_id --network mainnet 581eb32 ``` That [commit](581eb32) is from May 15th, well after PR #4800, which was merged May 10th. # Motivation This is the follow-up to #4800. In the previous PR we removed the transactions fields but still encoded to stable memory including the fields. In this PR we stop encoding the old fields completely. There will still be accounts in stable memory with the fields but they will be ignored when reading and removed when writing. We have not yet decided if we also want to do a migration round to remove all the fields from stable memory. # Changes 1. Stop converting `Account` to `OldAccount` before encoding it to stable memory. # Tests 1. `upgrade-downgrade-test` passed. 2. Manually tested upgrading and downgrading while creating new subaccounts before, in between and after. # Todos - [x] Add entry to changelog (if necessary). commit 7a9f74e Author: Max Strasinsky <[email protected]> Date: Tue May 21 17:31:10 2024 +0200 Upgrade gix components (#4898) # Motivation For the actionable page menu entry, we need an updated `Vote` icon with size prop support. # Changes - `npm run update:gix` # Tests Tests work. # Todos - [ ] Add entry to changelog (if necessary). Not necessary. commit 9138118 Author: David de Kloet <[email protected]> Date: Tue May 21 16:26:25 2024 +0200 Prevent installing a second snapshot before the previous one is restored (#4900) # Motivation When installing a snapshot, some files and directories are replaced with ones from the snapshot and the originals are placed in a backup directory. If you try to install a snapshot again, things can get confusing easily. Better to always restore the previous backup before installing the next. # Changes In `scripts/dfx-snapshot-install`, check if there is a directory with a name following the standard state backup directory name pattern. If there is, refuse to install the snapshot. # Tests Manually created a directory named `dfx-state-backup-123` and then tried to run a snapshot. Got: ``` $ scripts/dfx-snapshot-start -s /Users/dskloet/snapshots/2024-05-16-ckUSDC.tar.xz drwxr-xr-x 2 dskloet staff 64 May 21 15:12 /Users/dskloet/dfx-state-backup-123 ERROR: Found existing backup directory. Restore the previous backup before installing a new snapshot. sh: /Users/dskloet/dfx-state-backup-20240521_152046/restore.sh: No such file or directory ``` # Todos - [ ] Add entry to changelog (if necessary). not necessary commit ead5b23 Author: David de Kloet <[email protected]> Date: Tue May 21 16:12:50 2024 +0200 Keep existing identities when installing snapshot (#4899) # Motivation When installing an snsdemo snapshot, the entire `~/.config/dfx` directory gets replaced with the one from the snapshot. This includes all your identities. So while a snapshot is running, you can't use your normal identities. # Changes Instead of replacing the entire `~/.config/dfx` directory, replace all its contents (according to the snapshot), except the `identity` directory, then replace only those identities that exist in the snapshot, keeping the others. # Tests Ran a snapshot. Checked that identities were still there. # Todos - [ ] Add entry to changelog (if necessary).
- Loading branch information