Skip to content
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

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

noeliaSD
Copy link
Contributor

Closes #12365

What does the PR do

  • It adds link to the corresponding tokens model in EditCommunityTokenView.
  • It adds validation for name and symbol.
  • It updates 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

@status-im-auto
Copy link
Member

status-im-auto commented Nov 10, 2023

Jenkins Builds

Click to see older builds (5)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 7da6e6f #2 2023-11-10 15:53:11 ~8 min tests/nim 📄log
✔️ 7da6e6f #2 2023-11-10 15:58:37 ~13 min tests/ui 📄log
✔️ 7da6e6f #2 2023-11-10 16:01:03 ~15 min linux/x86_64 📦tgz
✔️ 7da6e6f #2 2023-11-10 16:19:05 ~33 min tests/e2e 📄log
✔️ 7da6e6f #2 2023-11-10 16:24:12 ~39 min windows/x86_64 💿exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 01987c4 #3 2023-11-13 12:43:26 ~5 min tests/nim 📄log
✔️ 01987c4 #3 2023-11-13 12:47:05 ~9 min macos/aarch64 🍎dmg
✔️ 01987c4 #3 2023-11-13 12:48:34 ~10 min tests/ui 📄log
✔️ 01987c4 #3 2023-11-13 12:49:40 ~11 min macos/x86_64 🍎dmg
✔️ 01987c4 #3 2023-11-13 12:53:10 ~15 min linux/x86_64 📦tgz
✔️ 01987c4 #3 2023-11-13 13:08:18 ~30 min tests/e2e 📄log
✔️ 01987c4 #3 2023-11-13 13:13:59 ~35 min windows/x86_64 💿exe
✔️ 9ff83fb #4 2023-11-22 16:58:30 ~6 min tests/nim 📄log
✔️ 9ff83fb #4 2023-11-22 16:58:51 ~7 min macos/aarch64 🍎dmg
✔️ 9ff83fb #4 2023-11-22 17:00:42 ~8 min macos/x86_64 🍎dmg
✔️ 9ff83fb #4 2023-11-22 17:03:26 ~11 min tests/ui 📄log
✔️ 9ff83fb #4 2023-11-22 17:05:02 ~13 min linux/x86_64 📦tgz
✔️ 9ff83fb #4 2023-11-22 17:21:29 ~29 min windows/x86_64 💿exe
✖️ 9ff83fb #4 2023-11-22 17:22:54 ~31 min tests/e2e 📄log
✔️ 9ff83fb #5 2023-11-23 10:12:55 ~35 min tests/e2e 📄log

Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@micieslak micieslak left a 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 :)

Comment on lines 71 to 88
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

Copy link
Member

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.

Copy link
Contributor Author

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!

Copy link
Contributor

@Khushboo-dev-cpp Khushboo-dev-cpp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

Copy link
Member

@micieslak micieslak left a 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
@noeliaSD noeliaSD merged commit 743ba69 into master Nov 23, 2023
8 of 9 checks passed
@noeliaSD noeliaSD deleted the feat/issue-12365 branch November 23, 2023 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Mint - Token management] Validation on token name / symbol if exists in token list
5 participants