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 #17948 - Allow editing of NFT sends #17970

Merged
merged 2 commits into from
Mar 9, 2023
Merged

Conversation

darkwing
Copy link
Contributor

@darkwing darkwing commented Mar 2, 2023

Explanation

The Edit link isn't displaying because confirm-transaction-base.component.js isn't being provided an onEdit prop. The problem ultimately is happening because ui/pages/confirm-transaction/confirm-token-transaction-switch.js renders a ConfirmTokenTransactionBase by route CONFIRM_TRANSFER_FROM_PATH without the onEdit.

Screenshots/Screencaps

EditNFTSend.mp4

Manual Testing Steps

  1. Enable the NFT feature with NFTS_V1 yarn start
  2. Start the NFT send flow
  3. On the confirmation screen, click "Edit"
  4. See the same NFT still selected
  5. Choose a different NFT
  6. On the confirmation screen, click "edit"

The proper NFT should display on the edit and confirmation screens.

Pre-merge author checklist

  • I've clearly explained:
    • What problem this PR is solving
    • How this problem was solved
    • How reviewers can test my changes
  • Sufficient automated test coverage has been added

Pre-merge reviewer checklist

  • Manual testing (e.g. pull and build branch, run in browser, test code being changed)
  • PR is linked to the appropriate GitHub issue
  • IF this PR fixes a bug in the release milestone, add this PR to the release milestone

If further QA is required (e.g. new feature, complex testing steps, large refactor), add the Extension QA Board label.

In this case, a QA Engineer approval will be be required.

@darkwing darkwing requested a review from a team as a code owner March 2, 2023 20:57
@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2023

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.

albertolive
albertolive previously approved these changes Mar 6, 2023
@darkwing darkwing force-pushed the 17948-edit-send-nft branch from edd9964 to 1fcf96d Compare March 7, 2023 15:41
@metamaskbot
Copy link
Collaborator

Builds ready [1fcf96d]
Page Load Metrics (1558 ± 75 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint95134112105
domContentLoaded12561878153714168
load12561878155815775
domInteractive12561878153714168
Bundle size diffs
  • background: 0 bytes
  • ui: 648 bytes
  • common: 0 bytes

@codecov
Copy link

codecov bot commented Mar 7, 2023

Codecov Report

Merging #17970 (82edb63) into develop (786a74d) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           develop   #17970      +/-   ##
===========================================
- Coverage    63.45%   63.43%   -0.01%     
===========================================
  Files          903      903              
  Lines        35263    35270       +7     
  Branches      8918     8918              
===========================================
  Hits         22373    22373              
- Misses       12890    12897       +7     
Impacted Files Coverage Δ
...rm-transaction/confirm-token-transaction-switch.js 5.26% <0.00%> (-3.07%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@darkwing darkwing force-pushed the 17948-edit-send-nft branch from ecc0d37 to 4db8bc0 Compare March 9, 2023 14:24
@darkwing darkwing force-pushed the 17948-edit-send-nft branch from 4db8bc0 to 82edb63 Compare March 9, 2023 14:43
@metamaskbot
Copy link
Collaborator

Builds ready [82edb63]
Page Load Metrics (1529 ± 58 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint921731152210
domContentLoaded12831676149511555
load13481768152912158
domInteractive12831676149511555
Bundle size diffs
  • background: 0 bytes
  • ui: 648 bytes
  • common: 0 bytes

Copy link
Contributor

@danjm danjm left a comment

Choose a reason for hiding this comment

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

I don't think we want to allow editing of these transactions if they are coming from a dapp. I'll run this code and test it to see if I can make any suggestions in that regard

@danjm
Copy link
Contributor

danjm commented Mar 9, 2023

I don't think we want to allow editing of these transactions if they are coming from a dapp. I'll run this code and test it to see if I can make any suggestions in that regard

Actually, after some testing, I think this is safe

@darkwing darkwing merged commit d6e61e9 into develop Mar 9, 2023
@darkwing darkwing deleted the 17948-edit-send-nft branch March 9, 2023 21:02
@github-actions github-actions bot locked and limited conversation to collaborators Mar 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot Edit a Send NFT from inside MetaMask
5 participants