-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(frontend): optional index canister #3334
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…to feat/optional-index-canister # Conflicts: # src/frontend/src/icp/components/transactions/IcTransactions.svelte
peterpeterparker
added a commit
that referenced
this pull request
Nov 5, 2024
# Motivation This might not suffise but, it's a first step, type wise, to defined the "Index Canister" as optional. # Notes I add to include comments because we cannot just set the index as optional. On the other side, I also need this new validation becase otherwise I cannot split PR #3334 in smaller PRs. # Changes - Provide validation and types `IcCanistersStrictSchema` - Add TODO for making the Index Canister optional typewise
peterpeterparker
added a commit
that referenced
this pull request
Nov 5, 2024
) # Motivation We will need to know if IC tokens are provided with or without Index Canister ID. Unrelated but, somehow related, we also want to know if a token is just a token or an IC token. # Notes Some test uncommented and will be activated in PR #3334 because they cannot be active unless the Index Canister ID is set to optional. # Changes - New validators `isIcToken`, `isNotIcToken`, `isIcTokenCanistersStrict` and `isNotIcTokenCanistersStrict`
peterpeterparker
added a commit
that referenced
this pull request
Nov 6, 2024
# Motivation To make the index canister optional in #3334 we need to test the `custom-token.services` which itself uses the `token.services`. That's why we need test for that services. Of course, we also need test generally speaking.
peterpeterparker
added a commit
that referenced
this pull request
Nov 7, 2024
# Motivation We need few more tests before being able to complete #3334.
src/frontend/src/tests/icp/validation/ic-token.validation.spec.ts
Outdated
Show resolved
Hide resolved
AntonioVentilii
approved these changes
Nov 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, TKs!
Relates to #2883 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Make the index canister ID optional in the core type definition without changing the way we load information - i.e. in a backwards compatible manner.
Notes
This PR is relatively large, so Antonio and I reviewed the code together offline.
Changes
custom-token.services.ts
: extendtoCustomToken
to support optional Index canister IDIcTransactions.svelte
: silently ignore listing transactions if no indexic-token.schema.ts
: set Index Canister as optional in the base typeIcCanisters
ic-add-custom-tokens.service.ts
: extend support to, in the future, to allow user to register custom token without index canister idicrc-wallet.worker.ts
: assert index is set. in the future this should not be called without index