Skip to content

fix: UX: Multichain: Send flow: Fix "Internal JSON-RPC Error" when editing transaction from NFT to Native Currency#23797

Merged
darkwing merged 3 commits intodevelopfrom
add-asset-change-e2e
Apr 29, 2024
Merged

fix: UX: Multichain: Send flow: Fix "Internal JSON-RPC Error" when editing transaction from NFT to Native Currency#23797
darkwing merged 3 commits intodevelopfrom
add-asset-change-e2e

Conversation

@darkwing
Copy link
Copy Markdown
Contributor

@darkwing darkwing commented Mar 29, 2024

Description

When create E2Es for the new send flow, editing a transaction from sending an NFT to sending native currency was throwing an Internal JSON-RPC Error. After discussion with @matthewwalsh0 , using 0x as the gas reset is the solution.

https://consensys.slack.com/archives/C03ETQA9EPK/p1713324192690549

Also adds an end to end test for ensuring that switching assets between a token to an NFT properly updates the asset.

Open in GitHub Codespaces

Related issues

Fixes: N/A

Manual testing steps

  1. Start the new send flow
  2. Choose an NFT, continue
  3. Click "edit"
  4. Choose the native currency
  5. Confirm the send
  6. All should work

Screenshots/Recordings

Before

N/A

After

N/A

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

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.

@darkwing darkwing added team-core-extension-ux Core Extension UX team needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. labels Mar 29, 2024
@darkwing darkwing requested a review from a team as a code owner March 29, 2024 00:50
@github-actions
Copy link
Copy Markdown
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.

@darkwing darkwing force-pushed the add-asset-change-e2e branch from a2f076f to 9fedf1c Compare March 29, 2024 20:19
@darkwing darkwing force-pushed the add-asset-change-e2e branch from 19baaa0 to a2c230e Compare April 17, 2024 03:00
@darkwing darkwing added the swap-send-blocker Issues that block release of the Swap & Send feature label Apr 17, 2024
@darkwing
Copy link
Copy Markdown
Contributor Author

The "Internal RPC-Error" failure is due to intrinsic gas too low

@darkwing darkwing force-pushed the add-asset-change-e2e branch from 55c43ed to 0ef4860 Compare April 17, 2024 22:46
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [1dcf5c5]
Page Load Metrics (1402 ± 714 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint724641558641
domContentLoaded107635209
load59401814021488714
domInteractive107635209
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 13 Bytes (0.00%)
  • common: -5 Bytes (-0.00%)

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [6c42928]
Page Load Metrics (1423 ± 629 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint872731475225
domContentLoaded16149383014
load75305914231311629
domInteractive16149383014
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 13 Bytes (0.00%)
  • common: -5 Bytes (-0.00%)

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [48e41ea]
Page Load Metrics (1279 ± 637 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint853561568641
domContentLoaded10100322010
load72319512791327637
domInteractive10100322010
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 13 Bytes (0.00%)
  • common: -5 Bytes (-0.00%)

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.46%. Comparing base (378bb27) to head (29062ce).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #23797   +/-   ##
========================================
  Coverage    67.46%   67.46%           
========================================
  Files         1258     1258           
  Lines        49235    49235           
  Branches     12818    12818           
========================================
  Hits         33213    33213           
  Misses       16022    16022           

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

@darkwing darkwing force-pushed the add-asset-change-e2e branch from 48e41ea to 84991e3 Compare April 23, 2024 01:30
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [29062ce]
Page Load Metrics (1795 ± 685 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint701931273115
domContentLoaded107827178
load54352217951426685
domInteractive107827178
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 0 Bytes (0.00%)
  • ui: 13 Bytes (0.00%)
  • common: -5 Bytes (-0.00%)

const { SMART_CONTRACTS } = require('../../seeder/smart-contracts');

describe('Change assets', function () {
if (!process.env.MULTICHAIN) {
Copy link
Copy Markdown
Contributor

@EtherWizard33 EtherWizard33 Apr 24, 2024

Choose a reason for hiding this comment

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

nit: if the testing framework used has a function to skip the test it could be interesting to use it so maybe it could potentially show how many tests were skipped, in a summary at the end of the test run

@darkwing darkwing changed the title test: UX: Multichain: Send flow: Add E2E for changing send asset fix: UX: Multichain: Send flow: Fix "Internal JSON-RPC Error" when editing transaction from NFT to Native Currency Apr 26, 2024
@darkwing darkwing merged commit 9cd8c79 into develop Apr 29, 2024
@darkwing darkwing deleted the add-asset-change-e2e branch April 29, 2024 17:24
@github-actions github-actions bot locked and limited conversation to collaborators Apr 29, 2024
@gauthierpetetin gauthierpetetin added the release-12.0.0 Issue or pull request that will be included in release 12.0.0 label Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. release-12.0.0 Issue or pull request that will be included in release 12.0.0 swap-send-blocker Issues that block release of the Swap & Send feature team-core-extension-ux Core Extension UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants