Skip to content

Conversation

pedronfigueiredo
Copy link
Contributor

@pedronfigueiredo pedronfigueiredo commented Jun 27, 2025

Description

Includes the following flows:

  • Send flow
  • Native transaction hero component
  • ERC20 transaction hero component
  • Transaction simulation balance changes
  • Selection of gas fee tokens

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/5256

Manual testing steps

async function connectMetaMask() {
  try {
    const accounts = await window.ethereum.request({
      method: 'eth_requestAccounts',
    });
    console.log('Connected account:', accounts[0]);
    return accounts[0];
  } catch (error) {
    console.error('User rejected the request:', error);
    throw error;
  }
}

async function createTransactionWithHexData() {
  try {
    const fromAddress = await connectMetaMask();

    const transactionParameters = {
      to: '0x0C8ADd8d1B0eEFd9E4FD646ab75E3762b38B87dC',
      from: fromAddress,
      value: '0xE8D4A51000',
    };

    const txHash = await window.ethereum.request({
      method: 'eth_sendTransaction',
      params: [transactionParameters],
    });

    console.log('Transaction hash:', txHash);
    return txHash;
  } catch (error) {
    console.error('Error creating transaction:', error);
  }
}

createTransactionWithHexData();

Screenshots/Recordings

Before

After

Screenshot 2025-06-27 at 17 40 55 Screenshot 2025-06-27 at 14 21 29 Screenshot 2025-06-27 at 13 27 01 Screenshot 2025-06-27 at 13 24 55

Pre-merge author checklist

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.

@pedronfigueiredo pedronfigueiredo self-assigned this Jun 27, 2025
@pedronfigueiredo pedronfigueiredo requested a review from a team as a code owner June 27, 2025 16:43
@pedronfigueiredo pedronfigueiredo added the team-confirmations Push issues to confirmations team label Jun 27, 2025
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.

@pedronfigueiredo pedronfigueiredo changed the title feat: Show <-zsh.01 when gas cost is really small feat: Show < 0.01 when gas cost is really small Jun 27, 2025
@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

@MetaMask/confirmations (3 files, +22 -5)
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 components/
          • 📁 confirm/
            • 📁 info/
              • 📁 hooks/
                • 📄 use-token-values.ts +7 -2
              • 📁 shared/
                • 📁 native-send-heading/
                  • 📄 native-send-heading.tsx +7 -2
          • 📁 simulation-details/
            • 📄 fiat-display.tsx +8 -1

@metamaskbot
Copy link
Collaborator

Builds ready [37f5da4]
UI Startup Metrics (1223 ± 84 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1223108215668412531392
load104793213967610781185
domContentLoaded104092413907510731175
domInteractive18147981829
firstPaint70683123041110501148
backgroundConnect74223813
firstReactRender24185872541
getState1663782031
initialActions003001
loadScripts831716118675864963
setupStore95304917
WebpackHomeuiStartup22111669269719423172587
load17001261208318418222010
domContentLoaded16941257207818418182006
domInteractive171269121452
firstPaint1586545158177277
backgroundConnect2313283272338
firstReactRender22288422116361408
getState174324441331
initialActions512962934
loadScripts16911256207618418152004
setupStore177278271725
FirefoxBrowserifyHomeuiStartup14321258187012914681736
load1249109815529112941462
domContentLoaded1249109815519112941462
domInteractive1253750172126332
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2613193232558
firstReactRender26223732733
getState17519234997
initialActions002001
loadScripts1226107715338612681397
setupStore1047012838
WebpackHomeuiStartup15931341223619816882048
load13681146197516814631714
domContentLoaded13681146197516814621714
domInteractive103325917993294
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect23154272641
firstReactRender41315444450
getState187255321333
initialActions102111
loadScripts13481130195016814451684
setupStore105609832
Benchmark value 24 exceeds gate value 23 for chrome browserify home mean firstReactRender
Benchmark value 16 exceeds gate value 15 for chrome browserify home mean getState
Benchmark value 832 exceeds gate value 830 for chrome browserify home mean loadScripts
Benchmark value 1393 exceeds gate value 1365 for chrome browserify home p95 uiStartup
Benchmark value 963 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 2212 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 2588 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 2006 exceeds gate value 2005 for chrome webpack home p95 domContentLoaded
Benchmark value 408 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 2004 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 1433 exceeds gate value 1405 for firefox browserify home mean uiStartup
Benchmark value 1249 exceeds gate value 1245 for firefox browserify home mean load
Benchmark value 1249 exceeds gate value 1239 for firefox browserify home mean domContentLoaded
Benchmark value 125 exceeds gate value 110 for firefox browserify home mean domInteractive
Benchmark value 27 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 26 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 17 exceeds gate value 11 for firefox browserify home mean getState
Benchmark value 11 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 1736 exceeds gate value 1660 for firefox browserify home p95 uiStartup
Benchmark value 332 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 97 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 38 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 103 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 42 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 18 exceeds gate value 15 for firefox webpack home mean getState
Benchmark value 2048 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1714 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1714 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 294 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 33 exceeds gate value 32 for firefox webpack home p95 getState
Benchmark value 1684 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Benchmark value 32 exceeds gate value 28 for firefox webpack home p95 setupStore
Sum of mean exceeds: 102ms | Sum of p95 exceeds: 973ms
Sum of all benchmark exceeds: 1075ms

Bundle size diffs [🚀 Bundle size reduced!]
  • background: 23 Bytes (0%)
  • ui: 1.67 KiB (0.02%)
  • common: -79 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [8770c4e]
UI Startup Metrics (1174 ± 60 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1174108614306012111290
load100190811835210301086
domContentLoaded99490311745110241074
domInteractive18147181733
firstPaint65281119039910261079
backgroundConnect74233812
firstReactRender21173432229
getState1463472129
initialActions001001
loadScripts78970396350816871
setupStore85283915
WebpackHomeuiStartup22611785279221623592726
load17151323208118118012049
domContentLoaded17081319206817917952038
domInteractive181281151565
firstPaint1706348872188330
backgroundConnect22115692640
firstReactRender25091424114374401
getState174310311633
initialActions214134
loadScripts17051318205717817922027
setupStore1776582130
FirefoxBrowserifyHomeuiStartup14021202190913114621659
load1225107014999112851390
domContentLoaded1225107014999112851390
domInteractive1173341558128263
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2413106182279
firstReactRender25215242632
getState13517021965
initialActions001001
loadScripts1207105414809112721368
setupStore134385391033
WebpackHomeuiStartup16301426267621717082057
load13931222210916414861715
domContentLoaded13921222210916414861714
domInteractive109337479495301
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2616247232542
firstReactRender42305144548
getState186342401131
initialActions001011
loadScripts13701201208716414651687
setupStore13521724930
Benchmark value 2262 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1716 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1709 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 250 exceeds gate value 235 for chrome webpack home mean firstReactRender
Benchmark value 1706 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2726 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 2050 exceeds gate value 2030 for chrome webpack home p95 load
Benchmark value 2039 exceeds gate value 2005 for chrome webpack home p95 domContentLoaded
Benchmark value 66 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 401 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 2028 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 117 exceeds gate value 110 for firefox browserify home mean domInteractive
Benchmark value 26 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 13 exceeds gate value 11 for firefox browserify home mean getState
Benchmark value 14 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 263 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 79 exceeds gate value 70 for firefox browserify home p95 backgroundConnect
Benchmark value 65 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 33 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 1630 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 1393 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1393 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 109 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 43 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 19 exceeds gate value 15 for firefox webpack home mean getState
Benchmark value 1371 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 2057 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1715 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1714 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 301 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 1687 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Benchmark value 30 exceeds gate value 28 for firefox webpack home p95 setupStore
Sum of mean exceeds: 187ms | Sum of p95 exceeds: 983ms
Sum of all benchmark exceeds: 1170ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 33 Bytes (0%)
  • ui: 983 Bytes (0.01%)
  • common: 15 Bytes (0%)

@vinistevam vinistevam added this pull request to the merge queue Jul 2, 2025
Merged via the queue into main with commit 214e60d Jul 2, 2025
146 checks passed
@vinistevam vinistevam deleted the pnf/5256 branch July 2, 2025 14:48
@github-actions github-actions bot locked and limited conversation to collaborators Jul 2, 2025
@metamaskbot metamaskbot added the release-12.23.0 Issue or pull request that will be included in release 12.23.0 label Jul 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.23.0 Issue or pull request that will be included in release 12.23.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants