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

fix: add validation error on NFT import #21028

Merged
merged 4 commits into from
Sep 29, 2023
Merged

fix: add validation error on NFT import #21028

merged 4 commits into from
Sep 29, 2023

Conversation

sahar-fehri
Copy link
Contributor

Description

Adds an error msg if contract address is not validation on the NFT import modal.

(Just to make the behavior more consistent with the token-import modal)

Manual testing steps

_1. Click on "import nft" button in the NFT tab
_2. Add invalid contract address and notice error msg

Screenshots/Recordings

Before

image

After

image

Fixes

https://consensyssoftware.atlassian.net/browse/MMASSETS-35

Pre-merge author checklist

  • [x ] I’ve followed MetaMask Coding Standards.
  • I've clearly explained:
    • What problem this PR is solving.
    • [ x] How this problem was solved.
    • [ x] How reviewers can test my changes.
  • [ x] I’ve indicated what issue this PR is linked to: Fixes #???
  • I’ve included tests if applicable.
  • I’ve documented any added code.
  • [x ] I’ve applied the right labels on the PR (see labeling guidelines).
  • [ x] I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@sahar-fehri sahar-fehri requested a review from a team as a code owner September 25, 2023 12:32
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@sahar-fehri sahar-fehri added the team-extension-ux DEPRECATED: please use "team-wallet-ux" label instead label Sep 25, 2023
.tool-versions Outdated Show resolved Hide resolved
@sahar-fehri sahar-fehri force-pushed the fix/MMASSETS-35 branch 2 times, most recently from 2b5d361 to a638876 Compare September 25, 2023 13:53
salimtb
salimtb previously approved these changes Sep 25, 2023
@sahar-fehri sahar-fehri force-pushed the fix/MMASSETS-35 branch 3 times, most recently from 2aa0916 to 5ab689d Compare September 25, 2023 16:36
@metamaskbot
Copy link
Collaborator

Builds ready [5ab689d]
Page Load Metrics (1735 ± 80 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint86149108189
domContentLoaded74144104189
load14082088173516780
domInteractive74144104189
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 105 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (941b734) 68.35% compared to head (2ba0590) 68.39%.

❗ Current head 2ba0590 differs from pull request most recent head 4c85958. Consider uploading reports for the commit 4c85958 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #21028      +/-   ##
===========================================
+ Coverage    68.35%   68.39%   +0.05%     
===========================================
  Files         1007     1007              
  Lines        40260    40256       -4     
  Branches     10770    10765       -5     
===========================================
+ Hits         27516    27533      +17     
+ Misses       12744    12723      -21     
Files Coverage Δ
.../multichain/import-nfts-modal/import-nfts-modal.js 95.08% <100.00%> (+0.35%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@NidhiKJha NidhiKJha left a comment

Choose a reason for hiding this comment

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

This looks really good @sahar-fehri , before I approve one follow-up question. Do we want to show the error message when the address field is blank, I think in this case we should not show any message.
Screenshot 2023-09-26 at 12 03 04 PM

@metamaskbot
Copy link
Collaborator

Builds ready [2ba0590]
Page Load Metrics (990 ± 347 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint84151107168
domContentLoaded68121100168
load791675990724347
domInteractive68121100168
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 109 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [504aac0]
Page Load Metrics (1044 ± 410 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint93150110178
domContentLoaded741581012311
load9021181044855410
domInteractive741581012311
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 118 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Member

@NidhiKJha NidhiKJha left a comment

Choose a reason for hiding this comment

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

LGTM!

@sahar-fehri sahar-fehri merged commit b4aff28 into develop Sep 29, 2023
9 checks passed
@sahar-fehri sahar-fehri deleted the fix/MMASSETS-35 branch September 29, 2023 08:47
@github-actions github-actions bot locked and limited conversation to collaborators Sep 29, 2023
@metamaskbot metamaskbot added the release-11.3.0 Issue or pull request that will be included in release 11.3.0 label Sep 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.3.0 Issue or pull request that will be included in release 11.3.0 team-extension-ux DEPRECATED: please use "team-wallet-ux" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants