We need to make the NNS-dapp treat imported tokens as ICRC tokens, just as it does with the current tokens, since imported tokens follow the ICRC standard. The only differences are that the index canister is optional (and the nns-dapp already handles this), and they are added by the user.
Rename icrcCanistersStore to defaultIcrcCanistersStore.
Introduce a new derived store that contains both the current ICRC canister IDs and imported token IDs, and give this store the old name icrcCanistersStore.
Adjust the NNS-dapp code so that it reads the canister IDs from the derived store and writes to the renamed defaultIcrcCanistersStore.
Tests
Adjust tests to reflect the changes.
Test for icrcCanistersStore.
Tested manually that there are not current functionality changes.
Todos
[ ] Add entry to changelog (if necessary).
Not necessary.
Motivation
We need to make the NNS-dapp treat imported tokens as ICRC tokens, just as it does with the current tokens, since imported tokens follow the ICRC standard. The only differences are that the index canister is optional (and the nns-dapp already handles this), and they are added by the user.
Note: This PR includes a solution suggested in another approach PR.
Changes
Tests
Todos