Skip to content

fix: hide claim bonus badge when no rewards are available#40299

Merged
Jwhiles merged 6 commits intomainfrom
visibility-of-claim-bonus
Feb 25, 2026
Merged

fix: hide claim bonus badge when no rewards are available#40299
Jwhiles merged 6 commits intomainfrom
visibility-of-claim-bonus

Conversation

@Jwhiles
Copy link
Copy Markdown
Contributor

@Jwhiles Jwhiles commented Feb 20, 2026

Description

This fixes an error in the previous implementation where the claim bonus CTA was always shown. Now we only show the CTA in the case that there is a bonus to claim

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Only show MUSD claim bonus CTA if there are rewards to claim

Related issues

Manual testing steps

  1. Enable the earnMerklCampaignClaiming remote feature flag (e.g. via .manifest-overrides.json)
  2. Ensure you have an account holding mUSD on Mainnet or Linea with unclaimed Merkl rewards
  3. If there is a bonus, claim it by clicking “Claim bonus”
  4. Verify that claim bonus CTA is no longer shown

Screenshots/Recordings

Before

After

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.

Note

Medium Risk
Introduces new reward-fetching and transaction-watching hooks that affect when claim CTAs render and trigger network/contract reads; errors or selector misuse could incorrectly hide/show the badge or cause extra requests.

Overview
Updates TokenCell to show the Merkl “Claim bonus” CTA only when the user has claimable rewards, swapping the previous eligibility/feature-flag check for a new useMerklRewards hook and reordering the footer layout to render the badge in the primary slot.

Adds useMerklRewards to fetch reward data (with abort/refetch support) and determine claimability using on-chain claimed amounts as the source of truth (with API fallback), and adds useOnMerklClaimConfirmed so ClaimBonusBadge can refetch rewards when a pending Merkl claim transaction confirms. Includes new unit tests for both hooks and updates existing TokenCell tests to mock the new module API.

Written by Cursor Bugbot for commit 4db6303. This will update automatically on new commits. Configure here.

@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.

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 20, 2026

✨ Files requiring CODEOWNER review ✨

💎 @MetaMask/metamask-assets (2 files, +22 -21)
  • 📁 ui/
    • 📁 components/
      • 📁 app/
        • 📁 assets/
          • 📁 token-cell/
            • 📄 token-cell.test.tsx +6 -0
            • 📄 token-cell.tsx +16 -21

👨‍🔧 @MetaMask/metamask-earn (7 files, +691 -29)
  • 📁 ui/
    • 📁 components/
      • 📁 app/
        • 📁 musd/
          • 📁 hooks/
            • 📄 useMerklClaim.ts +0 -27
            • 📄 useMerklRewards.test.ts +345 -0
            • 📄 useMerklRewards.ts +164 -0
            • 📄 useOnMerklClaimConfirmed.test.ts +95 -0
            • 📄 useOnMerklClaimConfirmed.ts +76 -0
            • 📄 claim-bonus-badge.tsx +7 -0
            • 📄 index.ts +4 -2

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Feb 20, 2026
@Jwhiles Jwhiles marked this pull request as ready for review February 20, 2026 17:18
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 20, 2026

Builds ready [e25afc4]
⚡ Performance Benchmarks (1437 ± 101 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account28721288320
total28721288320
Confirm Txconfirm_tx60701860726099
total60701860726099
Bridge User Actionsbridge_load_page24712253264
bridge_load_asset_picker1651166166
bridge_search_token7013703704
total11091111151122
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup14371186168510114961613
load122498814289212761372
domContentLoaded121698314189012701358
domInteractive2918123222489
firstPaint179691378204206292
backgroundConnect21519925312221241
firstReactRender18133032025
initialActions106113
loadScripts101878712159110631160
setupStore1373651623
numNetworkReqs312292192282
Chrome Browserify Startup Power User HomeuiStartup332414289592187243016533
load12451089184315212801572
domContentLoaded12291072182914612701563
domInteractive3620186253690
firstPaint239791772203281384
backgroundConnect10852784712108414453319
firstReactRender25177082635
initialActions104112
loadScripts1014861159814210361348
setupStore1555071629
numNetworkReqs80391512697133
Chrome Webpack Startup Standard HomeuiStartup85868811961029221030
load73360995293782911
domContentLoaded72860494693775905
domInteractive2916126252394
firstPaint1175839566148227
backgroundConnect26186272938
firstReactRender17113861932
initialActions104112
loadScripts72560293792774903
setupStore1162731218
numNetworkReqs312297202586
Chrome Webpack Startup Power User HomeuiStartup1262917304628213241543
load7276191188103721975
domContentLoaded7166131182104706968
domInteractive38181712836106
firstPaint1486951380170306
backgroundConnect1831301147136163286
firstReactRender21173632227
initialActions103111
loadScripts7136121174102704959
setupStore1254251519
numNetworkReqs1303625145154208
Firefox Browserify Startup Standard HomeuiStartup17101457259721217232185
load14381229214016714691736
domContentLoaded14361223213416714631736
domInteractive923332753110184
firstPaint------
backgroundConnect64322382969126
firstReactRender14112011416
initialActions102112
loadScripts14081204211116114411639
setupStore187140211641
numNetworkReqs312098202788
Firefox Browserify Startup Power User HomeuiStartup28152071758362029323661
load15821284593451915922104
domContentLoaded15821283593351915922103
domInteractive172441410177192427
firstPaint------
backgroundConnect416981332279579956
firstReactRender18136461723
initialActions103122
loadScripts15381259588751315471999
setupStore12414647162107547
numNetworkReqs873320536102174
Firefox Webpack Startup Standard HomeuiStartup17501452343431217611989
load14571205320419614841577
domContentLoaded14571205320319614841577
domInteractive110291791175131159
firstPaint------
backgroundConnect7727156915467117
firstReactRender16123031621
initialActions103112
loadScripts14331191318919614561548
setupStore34714411441664
numNetworkReqs301998162768
Firefox Webpack Startup Power User HomeuiStartup28042094670760529313725
load16431316542953616252451
domContentLoaded16421316542853516252451
domInteractive181381489197178585
firstPaint------
backgroundConnect4291101236277639967
firstReactRender21156162428
initialActions207123
loadScripts16061282538553515812430
setupStore13310778162142516
numNetworkReqs85182263885161
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2210222222
srpButtonToSrpForm9519596
confirmSrpToPwForm2312324
pwFormToMetricsScreen1601616
metricsToWalletReadyScreen1701718
doneButtonToHomeScreen12371412561256
openAccountMenuToAccountListLoaded70969570567259
total883314889539022
Onboarding New WalletcreateWalletToSocialScreen2191220220
srpButtonToPwForm1064110111
createPwToRecoveryScreen8088
skipBackupToMetricsScreen3513637
agreeButtonToOnboardingSuccess1501616
doneButtonToAssetList84742113001418
total123342216861806
Asset DetailsassetClickToPriceChart46155172
total46155172
Solana Asset DetailsassetClickToPriceChart6036364
total6036364
Import Srp HomeloginToHomeScreen189511018982072
openAccountMenuAfterLogin4424747
homeAfterImportWithNewWallet252618726752777
total46017747104710
Send TransactionsopenSendPageFromHome1811919
selectTokenToSendFormLoaded2212223
reviewTransactionToConfirmationPage8541854855
total90113916917
SwapopenSwapPageFromHome1239132133
fetchAndDisplaySwapQuotes568087563856413
total580387065176523
🌐 Dapp Page Load Benchmarks

Current Commit: e25afc4 | Date: 2/20/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±44ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 730ms (±39ms) 🟢 | historical mean value: 726ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±11ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 44ms 1.02s 1.34s 1.07s 1.34s
domContentLoaded 730ms 39ms 707ms 1.01s 745ms 1.01s
firstPaint 78ms 11ms 64ms 168ms 88ms 168ms
firstContentfulPaint 78ms 11ms 64ms 168ms 88ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 3.76 KiB (0.05%)
  • common: 20 Bytes (0%)

@Jwhiles Jwhiles changed the title feat: hide claim bonus badge when no rewards are available fix: hide claim bonus badge when no rewards are available Feb 20, 2026
@Matt561 Matt561 self-requested a review February 20, 2026 17:29
Matt561
Matt561 previously approved these changes Feb 20, 2026
@michaelmccallam
Copy link
Copy Markdown

bugbot run

'useMerklRewards: Error fetching claimable rewards',
error,
);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Refetch errors can leave stale CTA visible

Medium Severity

When fetchMerklRewardsForAsset/getClaimedAmountFromContract throws, the catch path logs but never clears claimableReward. After useOnMerklClaimConfirmed(refetch) runs, a transient error can keep the previous non-null claimableReward and leave the “Claim bonus” CTA visible even if rewards are no longer claimable.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this legit?

Copy link
Copy Markdown
Contributor

@nickewansmith nickewansmith left a comment

Choose a reason for hiding this comment

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

Noticed that the MUSD token doesn't seem to have a balance percentage and balance on the same side as other tokens when there is no claim link. I expect the token list item to look like other tokens when there is no claim link and rearrange items when there is.

Image Image

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 20, 2026

Builds ready [fa3fd61]
⚡ Performance Benchmarks (1365 ± 97 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account31250302394
total31250302394
Confirm Txconfirm_tx6034360376037
total6034360376037
Bridge User Actionsbridge_load_page23441249300
bridge_load_asset_picker1914196196
bridge_search_token71726737758
total11476812041248
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup1365116116329714251524
load115095713499112171314
domContentLoaded114295213419012081300
domInteractive2716149222379
firstPaint202601275207201328
backgroundConnect20318426616204236
firstReactRender17103441924
initialActions104112
loadScripts95676611629110221120
setupStore1274151419
numNetworkReqs312294212289
Chrome Browserify Startup Power User HomeuiStartup16921323222215317441946
load11231009174715411061526
domContentLoaded1109996165314810921503
domInteractive3318177223280
firstPaint193691664225238310
backgroundConnect28325240726290334
firstReactRender24145582741
initialActions106112
loadScripts90779814381428881276
setupStore1664681838
numNetworkReqs59381592555124
Chrome Webpack Startup Standard HomeuiStartup85668613121099041086
load725610103890771887
domContentLoaded719606103190765878
domInteractive2815109212381
firstPaint1146341065132236
backgroundConnect27197793046
firstReactRender17123451929
initialActions106112
loadScripts717604102289763876
setupStore1163251222
numNetworkReqs3122100212588
Chrome Webpack Startup Power User HomeuiStartup1197846205816812661452
load71263212811197001015
domContentLoaded70462612701196901009
domInteractive37181963732123
firstPaint1276547676135313
backgroundConnect16012930236158258
firstReactRender22173432428
initialActions102011
loadScripts70162412571176881001
setupStore1256671317
numNetworkReqs1063826150137207
Firefox Browserify Startup Standard HomeuiStartup16571412304925816672120
load14031189276122814131686
domContentLoaded14021183276122814121685
domInteractive8337149114788145
firstPaint------
backgroundConnect58271742557112
firstReactRender13111811417
initialActions103112
loadScripts13741166274422013841651
setupStore168148201534
numNetworkReqs321998212791
Firefox Browserify Startup Power User HomeuiStartup28072084478742029673609
load15911286259027616522119
domContentLoaded15911286259027616522118
domInteractive12833726138115410
firstPaint------
backgroundConnect289971142247263881
firstReactRender201568102023
initialActions107122
loadScripts15561263253226516112074
setupStore1778943238171729
numNetworkReqs59271443776139
Firefox Webpack Startup Standard HomeuiStartup18121496336734418072333
load15281281301532015291878
domContentLoaded15281280301532115291877
domInteractive124311539203132204
firstPaint------
backgroundConnect69272443782137
firstReactRender17134451826
initialActions103122
loadScripts15011257298431815041761
setupStore217126211663
numNetworkReqs302091162770
Firefox Webpack Startup Power User HomeuiStartup27622021409250828153887
load16061289267933016272486
domContentLoaded16061289267933016272486
domInteractive13732882158103537
firstPaint------
backgroundConnect3191181316257309877
firstReactRender2517188192431
initialActions311721723
loadScripts15631267256630815812299
setupStore1618767194239549
numNetworkReqs58231834252163
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2202221222
srpButtonToSrpForm9519696
confirmSrpToPwForm2302324
pwFormToMetricsScreen1701717
metricsToWalletReadyScreen1711718
doneButtonToHomeScreen89829510271409
openAccountMenuToAccountListLoaded78199278737877
total88503288618893
Onboarding New WalletcreateWalletToSocialScreen2192221222
srpButtonToPwForm1081109110
createPwToRecoveryScreen8099
skipBackupToMetricsScreen3613737
agreeButtonToOnboardingSuccess1711718
doneButtonToAssetList105636514191572
total144536918141964
Asset DetailsassetClickToPriceChart61227691
total61227691
Solana Asset DetailsassetClickToPriceChart5625659
total5625659
Import Srp HomeloginToHomeScreen1882418861886
openAccountMenuAfterLogin4024143
homeAfterImportWithNewWallet242812424562591
total434813143594536
Send TransactionsopenSendPageFromHome1801818
selectTokenToSendFormLoaded2693240
reviewTransactionToConfirmationPage8538852864
total89511901908
SwapopenSwapPageFromHome11415125138
fetchAndDisplaySwapQuotes46062346224629
total47141347204732
🌐 Dapp Page Load Benchmarks

Current Commit: fa3fd61 | Date: 2/20/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±40ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 722ms (±38ms) 🟢 | historical mean value: 726ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±11ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 40ms 1.01s 1.33s 1.08s 1.33s
domContentLoaded 722ms 38ms 697ms 1.00s 759ms 1.00s
firstPaint 77ms 11ms 56ms 172ms 84ms 172ms
firstContentfulPaint 77ms 11ms 56ms 172ms 84ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 267 Bytes (0.01%)
  • ui: 16.11 KiB (0.19%)
  • common: 624 Bytes (0.01%)

tokenAddress={token.address as string}
chainId={token.chainId as Hex}
label={t('merklRewardsClaimBonus')}
fallback={<TokenCellPercentChange token={displayToken} />}
Copy link
Copy Markdown
Contributor

@nickewansmith nickewansmith Feb 23, 2026

Choose a reason for hiding this comment

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

Do we need a fallBack param to handle this? Maybe instead we can wrap the merkle claim related logic in this component in a hook that decide whether or not to show the ClaimBonusBadge so that we don't need to pass a fallback component.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There's a few cases where we don't show the claim badge. Firstly, we don't never want to show it if the token / chain aren't ones we provide merkl rewards for, or if the the feature flag isn't turned on. Secondly, we don't want to show it if there are no rewards to claim.

The second case requires us to make some API calls in order to find out if there are claimable rewards. We want to avoid making these calls if we already know we can't offer claims for the token in question. That's why I ended up taking this approach - with having a fallback at two levels.

I guess it would be possible to instead write a hook that only makes the API calls if the first case if false. Let me give that a try and see how it looks.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sounds good. Doing this also helps contain the logic such that it is re-usable elsewhere if needed

@Jwhiles Jwhiles removed the INVALID-PR-TEMPLATE PR's body doesn't match template label Feb 23, 2026
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Feb 23, 2026
@metamaskbot metamaskbot removed the INVALID-PR-TEMPLATE PR's body doesn't match template label Feb 23, 2026
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 23, 2026

Builds ready [c203d86]
⚡ Performance Benchmarks (1395 ± 102 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account27726267322
total27726267322
Confirm Txconfirm_tx6048860546057
total6048860546057
Bridge User Actionsbridge_load_page28135306314
bridge_load_asset_picker19241231247
bridge_search_token73522750771
total12088612871332
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup13951174164810214481591
load117399014069112131352
domContentLoaded116698113859012101341
domInteractive2816117202380
firstPaint170691309142218362
backgroundConnect20618427215207237
firstReactRender19104162132
initialActions107113
loadScripts97778711969010131158
setupStore1363551621
numNetworkReqs312291202287
Chrome Browserify Startup Power User HomeuiStartup20101395917895518863811
load11821037181116311831601
domContentLoaded11681029172115811711582
domInteractive40202803737127
firstPaint1967954698257359
backgroundConnect41624537324853101303
firstReactRender24155072638
initialActions106113
loadScripts96083315071559681340
setupStore1665581731
numNetworkReqs64351552770136
Chrome Webpack Startup Standard HomeuiStartup85669512621079001097
load728604101293783894
domContentLoaded72360099492779888
domInteractive2816101212386
firstPaint1166037361133237
backgroundConnect27195473044
firstReactRender20124382339
initialActions103112
loadScripts72059898691777879
setupStore1264151320
numNetworkReqs312295212591
Chrome Webpack Startup Power User HomeuiStartup1177858172616312491548
load6875991026100679965
domContentLoaded6775941019100666957
domInteractive3317118233296
firstPaint14658995113169272
backgroundConnect17614237648169304
firstReactRender22173542430
initialActions104111
loadScripts675592101298664942
setupStore1274861318
numNetworkReqs1083826250133227
Firefox Browserify Startup Standard HomeuiStartup16971443274921517122176
load14251225244516914571695
domContentLoaded14241224244516914571695
domInteractive883431556106179
firstPaint------
backgroundConnect63303253662119
firstReactRender14114031416
initialActions113022
loadScripts13961194233815814321632
setupStore208211281742
numNetworkReqs321999212792
Firefox Browserify Startup Power User HomeuiStartup26841995506544728063541
load15651244305729416222168
domContentLoaded15651244305629416192168
domInteractive147341721200127428
firstPaint------
backgroundConnect2641071218234238864
firstReactRender19146591826
initialActions103122
loadScripts15251217302828315762123
setupStore1739747215257655
numNetworkReqs68271763585129
Firefox Webpack Startup Standard HomeuiStartup17281467318127417362036
load14451244286221114621691
domContentLoaded14451240286221114621691
domInteractive893023544129145
firstPaint------
backgroundConnect7829143214273147
firstReactRender16122731624
initialActions103122
loadScripts14181226282920714431550
setupStore177145201545
numNetworkReqs311993172778
Firefox Webpack Startup Power User HomeuiStartup27672038383740329633568
load16011267247029016962296
domContentLoaded16011267247029016952296
domInteractive15032914172134617
firstPaint------
backgroundConnect364791133288534964
firstReactRender22156362430
initialActions113122
loadScripts15591247241327416332229
setupStore17411813225217725
numNetworkReqs67252283979130
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2237231232
srpButtonToSrpForm9419595
confirmSrpToPwForm2312425
pwFormToMetricsScreen1501515
metricsToWalletReadyScreen1611616
doneButtonToHomeScreen68093764777
openAccountMenuToAccountListLoaded7837678447844
total89279589858990
Onboarding New WalletcreateWalletToSocialScreen2161217217
srpButtonToPwForm1011101102
createPwToRecoveryScreen8088
skipBackupToMetricsScreen3413435
agreeButtonToOnboardingSuccess1511616
doneButtonToAssetList85732611931313
total123432915831687
Asset DetailsassetClickToPriceChart3734041
total3734041
Solana Asset DetailsassetClickToPriceChart4424646
total4424646
Import Srp HomeloginToHomeScreen19998020522109
openAccountMenuAfterLogin4114142
homeAfterImportWithNewWallet24481824582469
total45511745704570
Send TransactionsopenSendPageFromHome1811819
selectTokenToSendFormLoaded2022123
reviewTransactionToConfirmationPage8491849851
total8947902904
SwapopenSwapPageFromHome13115140153
fetchAndDisplaySwapQuotes536682463636380
total549783765166520
🌐 Dapp Page Load Benchmarks

Current Commit: c203d86 | Date: 2/23/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±168ms) 🟡 | historical mean value: 1.06s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 741ms (±195ms) 🟢 | historical mean value: 736ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 94ms (±178ms) 🟢 | historical mean value: 80ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 168ms 1.02s 2.71s 1.08s 2.71s
domContentLoaded 741ms 195ms 704ms 2.66s 745ms 2.66s
firstPaint 94ms 178ms 60ms 1.86s 88ms 1.86s
firstContentfulPaint 94ms 178ms 60ms 1.86s 88ms 1.86s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 3.83 KiB (0.05%)
  • common: 20 Bytes (0%)

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 24, 2026

Builds ready [39799ba]
⚡ Performance Benchmarks (1376 ± 119 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account30541338368
total30541338368
Confirm Txconfirm_tx61176461856202
total61176461856202
Bridge User Actionsbridge_load_page23917247268
bridge_load_asset_picker20740246262
bridge_search_token72418738746
total11706212251236
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup13761154189311914261574
load1164968162610712071349
domContentLoaded1155963155010112041337
domInteractive2816117222491
firstPaint164671220134203325
backgroundConnect20318429217205238
firstReactRender18133642024
initialActions108124
loadScripts96878413579810121138
setupStore1365971623
numNetworkReqs312288192284
Chrome Browserify Startup Power User HomeuiStartup17151390262719217352145
load11211001167413611151492
domContentLoaded1106990164113011011482
domInteractive3318144233283
firstPaint175731649167229299
backgroundConnect28625450434290348
firstReactRender23154672640
initialActions104112
loadScripts90679714211288961287
setupStore1674781934
numNetworkReqs59351572563125
Chrome Webpack Startup Standard HomeuiStartup88468712141089351106
load75361396490831897
domContentLoaded74760895389825891
domInteractive2816112192474
firstPaint1225938666160237
backgroundConnect27196693044
firstReactRender18123762032
initialActions105112
loadScripts74460694488823885
setupStore1255261220
numNetworkReqs312296202584
Chrome Webpack Startup Power User HomeuiStartup1224862183417613421553
load7146291116104703989
domContentLoaded7046221106102693979
domInteractive35181772732114
firstPaint1376553686148319
backgroundConnect17513238347174268
firstReactRender23164942528
initialActions102011
loadScripts7026201096100691971
setupStore1344971432
numNetworkReqs1073825650139211
Firefox Browserify Startup Standard HomeuiStartup17711459274725217792431
load14921232225020115161854
domContentLoaded14911227225020215111853
domInteractive1083533156140237
firstPaint------
backgroundConnect6135210216591
firstReactRender14112421416
initialActions104122
loadScripts14641208222219814931827
setupStore298905911754
numNetworkReqs322099202789
Firefox Browserify Startup Power User HomeuiStartup28392190837769428943659
load16721362652355717072318
domContentLoaded16721362652255717072317
domInteractive13835720127127444
firstPaint------
backgroundConnect2451071000198232798
firstReactRender19156791923
initialActions103122
loadScripts16361343649255316632258
setupStore1589774212148677
numNetworkReqs61261473380133
Firefox Webpack Startup Standard HomeuiStartup18451419336936418362314
load15441208301129915441781
domContentLoaded15441207301129915441781
domInteractive1033238557133215
firstPaint------
backgroundConnect7929153415071135
firstReactRender16132621619
initialActions103122
loadScripts15171181298229815091761
setupStore238166232454
numNetworkReqs302086162775
Firefox Webpack Startup Power User HomeuiStartup27762028388746628613705
load16321317250929717652272
domContentLoaded16311317250929717602271
domInteractive12338748128116438
firstPaint------
backgroundConnect25765916198239854
firstReactRender22167282330
initialActions203122
loadScripts15871298249227517112194
setupStore218101027257371705
numNetworkReqs58261463581130
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2171218220
srpButtonToSrpForm9109192
confirmSrpToPwForm2102121
pwFormToMetricsScreen1501515
metricsToWalletReadyScreen1601616
doneButtonToHomeScreen87725811141250
openAccountMenuToAccountListLoaded703159876377848
total827038686908786
Onboarding New WalletcreateWalletToSocialScreen2180219219
srpButtonToPwForm1041104105
createPwToRecoveryScreen8088
skipBackupToMetricsScreen3413435
agreeButtonToOnboardingSuccess1611617
doneButtonToAssetList586117620793
total97312510241188
Asset DetailsassetClickToPriceChart3123132
total3123132
Solana Asset DetailsassetClickToPriceChart5945865
total5945865
Import Srp HomeloginToHomeScreen207213522262229
openAccountMenuAfterLogin4224344
homeAfterImportWithNewWallet23958624382515
total464438747865345
Send TransactionsopenSendPageFromHome30104041
selectTokenToSendFormLoaded1912020
reviewTransactionToConfirmationPage8557859867
total9061907907
SwapopenSwapPageFromHome12012126140
fetchAndDisplaySwapQuotes4613946264626
total47271547254752
🌐 Dapp Page Load Benchmarks

Current Commit: 39799ba | Date: 2/24/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 982ms (±38ms) 🟢 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 680ms (±35ms) 🟢 | historical mean value: 729ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±11ms) 🟢 | historical mean value: 82ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 982ms 38ms 959ms 1.25s 1.00s 1.25s
domContentLoaded 680ms 35ms 660ms 935ms 696ms 935ms
firstPaint 77ms 11ms 64ms 176ms 84ms 176ms
firstContentfulPaint 77ms 11ms 64ms 176ms 84ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -44.86 KiB (-1.02%)
  • ui: 3.44 KiB (0.04%)
  • common: -45.69 KiB (-0.41%)

Jwhiles and others added 5 commits February 24, 2026 12:38
Add useMerklRewards hook to check claimable reward amounts and
useOnMerklClaimConfirmed to refetch after a claim confirms. The badge
now returns null when there is nothing to claim. Also deduplicates
isEligibleForMerklRewards into useMerklRewards.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 24, 2026

Builds ready [7edeb2a]
⚡ Performance Benchmarks (1345 ± 103 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account27010281282
total27010281282
Confirm Txconfirm_tx60511960626076
total60511960626076
Bridge User Actionsbridge_load_page2087213216
bridge_load_asset_picker19710196214
bridge_search_token70712720721
total11091911221134
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup13451154175510313771541
load113595414339311731321
domContentLoaded112994514259211681302
domInteractive261696182377
firstPaint158651126123202283
backgroundConnect19818324913199229
firstReactRender18113741923
initialActions104113
loadScripts9477471222919851115
setupStore1263851519
numNetworkReqs312291202285
Chrome Browserify Startup Power User HomeuiStartup16931380230515317162020
load11271011180415711041515
domContentLoaded11111004170114910901484
domInteractive35191783033114
firstPaint182711733179241311
backgroundConnect28025036921288317
firstReactRender24155882540
initialActions1012113
loadScripts90979914831468851272
setupStore16678101833
numNetworkReqs59371592953145
Chrome Webpack Startup Standard HomeuiStartup8346981242988671002
load71760991984760868
domContentLoaded71160691383749859
domInteractive2615109192278
firstPaint1126238567126237
backgroundConnect26195972937
firstReactRender17113761931
initialActions102112
loadScripts70960491182747857
setupStore1144551117
numNetworkReqs312297202591
Chrome Webpack Startup Power User HomeuiStartup1197851201316712861498
load7076231312119691996
domContentLoaded6986161299119682991
domInteractive37181693336134
firstPaint1256535466140276
backgroundConnect17312835747172278
firstReactRender22183732329
initialActions102011
loadScripts6956141289117680984
setupStore1244161320
numNetworkReqs1083625549136224
Firefox Browserify Startup Standard HomeuiStartup16421412238017916461989
load13811175210713514091646
domContentLoaded13801175210213514081646
domInteractive823427551101187
firstPaint------
backgroundConnect61302383458114
firstReactRender13111811415
initialActions103122
loadScripts13531153208113113851594
setupStore177139181543
numNetworkReqs3120100202587
Firefox Browserify Startup Power User HomeuiStartup28202085422840829093765
load16221329259021917102067
domContentLoaded16211329258521917092067
domInteractive12236492100122417
firstPaint------
backgroundConnect24490926182248589
firstReactRender20156892025
initialActions203122
loadScripts15801301256121316462005
setupStore15310776212134657
numNetworkReqs58251573778142
Firefox Webpack Startup Standard HomeuiStartup17181422333432517182033
load14371204289222514591620
domContentLoaded14371204289122514591619
domInteractive101291509149129157
firstPaint------
backgroundConnect63263254765175
firstReactRender15122931520
initialActions102022
loadScripts14091182285121914351551
setupStore33713991391577
numNetworkReqs311994172771
Firefox Webpack Startup Power User HomeuiStartup27271843874874727693610
load15521288249925216592021
domContentLoaded15521287249925216592021
domInteractive1053259586103252
firstPaint------
backgroundConnect296775215529242798
firstReactRender21166762329
initialActions213123
loadScripts15151266247223716351917
setupStore1709828207233653
numNetworkReqs57271633581135
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2181218218
srpButtonToSrpForm94599101
confirmSrpToPwForm2102121
pwFormToMetricsScreen1501515
metricsToWalletReadyScreen1501515
doneButtonToHomeScreen94343314081533
openAccountMenuToAccountListLoaded710410972047222
total859352790029097
Onboarding New WalletcreateWalletToSocialScreen2171218219
srpButtonToPwForm1022103104
createPwToRecoveryScreen8088
skipBackupToMetricsScreen3413435
agreeButtonToOnboardingSuccess1501516
doneButtonToAssetList61922650650
total10275510361113
Asset DetailsassetClickToPriceChart46104263
total46104263
Solana Asset DetailsassetClickToPriceChart4824850
total4824850
Import Srp HomeloginToHomeScreen18397818991914
openAccountMenuAfterLogin4014040
homeAfterImportWithNewWallet24809725462611
total43544643684414
Send TransactionsopenSendPageFromHome27123844
selectTokenToSendFormLoaded2012020
reviewTransactionToConfirmationPage8484848853
total89516900918
SwapopenSwapPageFromHome1351137137
fetchAndDisplaySwapQuotes46457547304737
total47858148654871
🌐 Dapp Page Load Benchmarks

Current Commit: 7edeb2a | Date: 2/24/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±42ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 747ms (±63ms) 🟢 | historical mean value: 726ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 83ms (±43ms) 🟢 | historical mean value: 81ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 42ms 1.03s 1.38s 1.11s 1.38s
domContentLoaded 747ms 63ms 718ms 1.32s 784ms 1.32s
firstPaint 83ms 43ms 64ms 504ms 88ms 504ms
firstContentfulPaint 83ms 43ms 64ms 504ms 88ms 504ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 3.42 KiB (0.04%)
  • common: 20 Bytes (0%)

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@sonarqubecloud
Copy link
Copy Markdown

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 24, 2026

Builds ready [4db6303]
⚡ Performance Benchmarks (1351 ± 93 ms)
👆 Interaction Benchmarks
ActionMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account30048341374
total30048341374
Confirm Txconfirm_tx60391360486059
total60391360486059
Bridge User Actionsbridge_load_page19512192216
bridge_load_asset_picker21110223223
bridge_search_token7003702703
total1098811031106
🔌 Startup Benchmarks
BuildMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
Chrome Browserify Startup Standard HomeuiStartup1351116015889314051535
load115196813568511911322
domContentLoaded114596413498511841318
domInteractive2816114222391
firstPaint177681254192204382
backgroundConnect20018424612204224
firstReactRender18124441924
initialActions107114
loadScripts96077511688610021136
setupStore1263651521
numNetworkReqs312296202286
Chrome Browserify Startup Power User HomeuiStartup2957134310281205838609133
load12261038179116612811636
domContentLoaded12071027171715812411574
domInteractive3820245343594
firstPaint222831737224258482
backgroundConnect10002577794137311233495
firstReactRender24164862636
initialActions104112
loadScripts1001828148115310321350
setupStore1556381724
numNetworkReqs80401482494125
Chrome Webpack Startup Standard HomeuiStartup86170511901019191074
load731616109893782884
domContentLoaded726612109192777875
domInteractive2816102212281
firstPaint1136141271124228
backgroundConnect27186883144
firstReactRender18113562131
initialActions107112
loadScripts723611108891774872
setupStore1163841220
numNetworkReqs312296202588
Chrome Webpack Startup Power User HomeuiStartup1241904221021813161574
load75766414001167541002
domContentLoaded7456571390115736992
domInteractive44202904239147
firstPaint1567444783190325
backgroundConnect17413674474165311
firstReactRender23173232530
initialActions102011
loadScripts7426551365113734983
setupStore1345171526
numNetworkReqs88371952892152
Firefox Browserify Startup Standard HomeuiStartup16231364253220716481971
load13581138216616014131590
domContentLoaded13571134216116014131590
domInteractive83333104999151
firstPaint------
backgroundConnect62282843364108
firstReactRender13112221416
initialActions102012
loadScripts13281117213415313841511
setupStore207172301564
numNetworkReqs311997202788
Firefox Browserify Startup Power User HomeuiStartup27262012560551229073472
load15241262353830715751909
domContentLoaded15231262353830715741908
domInteractive154351703185142398
firstPaint------
backgroundConnect3621231799294458936
firstReactRender201478121827
initialActions209122
loadScripts14831242348330315441890
setupStore12613930189109600
numNetworkReqs833119438104172
Firefox Webpack Startup Standard HomeuiStartup16271380200712016761867
load1374116216079614321571
domContentLoaded1373116016069614291571
domInteractive952924847130169
firstPaint------
backgroundConnect5724179276398
firstReactRender15123431524
initialActions102012
loadScripts1349114715829214071545
setupStore187169231543
numNetworkReqs312192182783
Firefox Webpack Startup Power User HomeuiStartup26702128369931027773288
load15121264220220815781916
domContentLoaded15121264220120715781909
domInteractive16248819151159423
firstPaint------
backgroundConnect3931111278269605904
firstReactRender21166372235
initialActions203123
loadScripts14721224217720515031893
setupStore17311703179215556
numNetworkReqs80312334286172
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2170218218
srpButtonToSrpForm8808989
confirmSrpToPwForm2002021
pwFormToMetricsScreen1501515
metricsToWalletReadyScreen1501515
doneButtonToHomeScreen68381751774
openAccountMenuToAccountListLoaded745343578047809
total849239887488935
Onboarding New WalletcreateWalletToSocialScreen2202221222
srpButtonToPwForm1061107107
createPwToRecoveryScreen9099
skipBackupToMetricsScreen3703737
agreeButtonToOnboardingSuccess1701717
doneButtonToAssetList673110699872
total106510810891258
Asset DetailsassetClickToPriceChart3903940
total3903940
Solana Asset DetailsassetClickToPriceChart4724750
total4724750
Import Srp HomeloginToHomeScreen19387019422045
openAccountMenuAfterLogin4414545
homeAfterImportWithNewWallet261833127333216
total467639251055176
Send TransactionsopenSendPageFromHome1811919
selectTokenToSendFormLoaded2883839
reviewTransactionToConfirmationPage8588867867
total90511907923
SwapopenSwapPageFromHome12612134139
fetchAndDisplaySwapQuotes46092146264628
total47331547434748
🌐 Dapp Page Load Benchmarks

Current Commit: 4db6303 | Date: 2/24/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±40ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 729ms (±37ms) 🟢 | historical mean value: 726ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±12ms) 🟢 | historical mean value: 81ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 40ms 1.01s 1.34s 1.07s 1.34s
domContentLoaded 729ms 37ms 700ms 998ms 751ms 998ms
firstPaint 78ms 12ms 60ms 188ms 84ms 188ms
firstContentfulPaint 78ms 12ms 60ms 188ms 84ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 3.42 KiB (0.04%)
  • common: 20 Bytes (0%)

@Jwhiles Jwhiles added this pull request to the merge queue Feb 25, 2026
Merged via the queue into main with commit 2e23aeb Feb 25, 2026
179 checks passed
@Jwhiles Jwhiles deleted the visibility-of-claim-bonus branch February 25, 2026 11:32
@github-actions github-actions bot locked and limited conversation to collaborators Feb 25, 2026
@metamaskbot metamaskbot added the release-13.21.0 Issue or pull request that will be included in release 13.21.0 label Feb 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.21.0 Issue or pull request that will be included in release 13.21.0 size-L team-earn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants