-
Notifications
You must be signed in to change notification settings - Fork 78
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(MintToken): Validation on name / symbol if exists in standard token list #12696
Conversation
177d2d0
to
7da6e6f
Compare
Jenkins BuildsClick to see older builds (5)
|
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
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.
One suggestion worth considering imo :)
readonly property bool containsAssetReferenceName: root.isAssetView ? SQUtils.ModelUtils.contains(root.referenceAssetsBySymbolModel, "name", nameInput.text) : false | ||
readonly property bool containsAssetReferenceSymbol: root.isAssetView ? SQUtils.ModelUtils.contains(root.referenceAssetsBySymbolModel, "symbol", symbolInput.text) : false | ||
|
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.
It could be done like that or via SFPM with two ValueFilter
's inside AnyOf
filter. Then it prevents from duplicates a bit better. ModelUtils.contains
checks only in time of invocation, it won't be reevaluated when referenceAssetsBySymbolModel
changes internally.
So let's say that user provides input, it's checked that's ok, but then in some community we know sb has created token with given name or symbol. This won't be detected in current approach and action of creating token with such duplicated name/symbol won't be blocked. On the other hand the the approach with SFPM is able to detect that so I would opt for using that approach here.
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.
Good point. Going to update it!
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 :)
7da6e6f
to
01987c4
Compare
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!
…ken list - It adds link to the corresponding tokens model in `EditCommunityTokenView`. - It adds validation for `name` and `symbol`. - It updates `storybook accordingly.` Closes #12365
01987c4
to
9ff83fb
Compare
Closes #12365
What does the PR do
EditCommunityTokenView
.name
andsymbol
.storybook accordingly.
NOTE: Real validation will be available into the app once the following pr is integrated
Affected areas
Community Settings / Mint Tokens
Screenshot of functionality
Screen.Recording.2023-11-10.at.16.37.31.mov