Skip to content

feat: implement Merkl claim status toasts and localization#39979

Merged
PatrykLucka merged 8 commits intomainfrom
custom-claim-transaction-toast
Feb 13, 2026
Merged

feat: implement Merkl claim status toasts and localization#39979
PatrykLucka merged 8 commits intomainfrom
custom-claim-transaction-toast

Conversation

@PatrykLucka
Copy link
Contributor

@PatrykLucka PatrykLucka commented Feb 11, 2026

Description

Adds custom toast notifications for the mUSD Merkl rewards claiming flow. When a user initiates a Merkl claim transaction, the toast tracks the transaction lifecycle: in-progress (with spinner) → success/failed (auto-hides after 5s).

Also fixes a pre-existing bug in home.component.js where the "network added" notification would reappear after navigating away and back — onAutoHide was calling the raw setEditedNetwork() action creator (no-op) instead of the dispatched clearEditedNetwork() prop.

Changes:

  • useMerklClaimStatus hook — monitors Redux transactions for Merkl Distributor address, detects pending → confirmed/failed/dropped transitions, and exposes toastState + dismissToast
  • MerklClaimToast component in ToastMaster — renders loading spinner (in-progress), checkmark (success), or error icon (failed) using @metamask/design-system-react icons
  • 3 new i18n strings for toast messages
  • Bug fix: home.component.js onAutoHide now calls clearEditedNetwork() (dispatched) instead of setEditedNetwork() (undispatched import)

Note: This has been tested together with the full claim-musd branch changes from PR #39901 (Merkl rewards functionality — still WIP), but this PR is independent and can be merged first.

Changelog

CHANGELOG entry: Added toast notifications for mUSD reward claim transaction status (in-progress, success, failed); fixed a bug where the "network added" home notification would reappear after navigation

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/MUSD-303

Manual testing steps

  1. Apply the full Merkl claiming changes from the claim-musd branch (PR feat: add Merkl rewards functionality and localization #39901) on top of this branch
  2. Hold mUSD with unclaimed Merkl rewards, claim via the Claim flow
  3. Verify the "Your mUSD bonus is processing" toast appears with a spinning loader
  4. After transaction confirms, verify "Your mUSD bonus is here!" toast appears with a checkmark and auto-hides after 5 seconds
  5. Reject a claim transaction — verify "Bonus claim failed" toast appears with an error icon
  6. For the bug fix: add a custom network, wait for the "successfully added" notification to auto-hide, navigate away and back — verify it does NOT reappear

Screenshots/Recordings

Before

After

custom-toast-musd-claim-extension.mov

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
Adds new UI toast behavior driven by transaction state transitions; low blast radius but mistakes could cause noisy/incorrect user notifications or missed claim feedback.

Overview
Adds mUSD Merkl rewards claim status toasts that watch Merkl distributor transactions and show in-progress (spinner) then success/failed completion messages (auto-hiding after 5s).

Introduces a new useMerklClaimStatus hook (with tests) to detect pending→confirmed/failed/dropped transitions and prevent duplicate completion toasts, wires it into ToastMaster, and adds new i18n strings.

Fixes home.component.js notification auto-hide to call the dispatched clearEditedNetwork() instead of an undispatched setEditedNetwork() action creator.

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

@PatrykLucka PatrykLucka self-assigned this Feb 11, 2026
@PatrykLucka PatrykLucka requested review from a team as code owners February 11, 2026 10:44
@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.

@metamaskbot metamaskbot added the team-mobile-ux Mobile UX team label Feb 11, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 11, 2026

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/core-extension-ux (1 files, +1 -2)
  • 📁 ui/
    • 📁 pages/
      • 📁 home/
        • 📄 home.component.js +1 -2

🔒 @MetaMask/extension-security-team (1 files, +4 -0)
  • 📁 .github/
    • 📄 CODEOWNERS +4 -0

@PatrykLucka PatrykLucka requested a review from a team as a code owner February 11, 2026 16:09
@PatrykLucka PatrykLucka removed the request for review from a team February 11, 2026 16:10
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 11, 2026

Builds ready [58e9fd3]
UI Startup Metrics (1333 ± 96 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1333115918759613721478
load114898715978811911278
domContentLoaded114297315878811881270
domInteractive251692182277
firstPaint167651162157200332
backgroundConnect23321528313235265
firstReactRender1811195181729
initialActions105113
loadScripts9247521323869681061
setupStore1162441418
numNetworkReqs231588201584
BrowserifyPower User HomeuiStartup2487139310694181522754898
load12031038195917212341634
domContentLoaded11871024194116712131589
domInteractive37182283633112
firstPaint216741573171271419
backgroundConnect923286838216134063342
firstReactRender22154762338
initialActions1010112
loadScripts94979316781579921287
setupStore1574061730
numNetworkReqs1225026645149187
WebpackStandard HomeuiStartup8126671298100878956
load703590107289754842
domContentLoaded697587105588749835
domInteractive261595172373
firstPaint116621064106123226
backgroundConnect26186483039
firstReactRender1492941721
initialActions103112
loadScripts694585104787747831
setupStore1162851223
numNetworkReqs231593201582
WebpackPower User HomeuiStartup1286884247627013341850
load7436251154108764999
domContentLoaded7316191140107747979
domInteractive41192043239111
firstPaint181711146183185347
backgroundConnect17512946173161363
firstReactRender23173742430
initialActions101011
loadScripts7286171132105745969
setupStore1354371621
numNetworkReqs1375722739156201
FirefoxBrowserifyStandard HomeuiStartup16241395228915816651996
load14041203192112614561653
domContentLoaded14031203192112614551653
domInteractive903434157115227
firstPaint------
backgroundConnect5728202245781
firstReactRender13102211314
initialActions103122
loadScripts13771187181111914271621
setupStore156176211345
numNetworkReqs241295211886
BrowserifyPower User HomeuiStartup28092010720657129293542
load16101293546944516562163
domContentLoaded16101292546944516562163
domInteractive15436682135131462
firstPaint------
backgroundConnect3331091525285402945
firstReactRender201577102028
initialActions203122
loadScripts15731267541944115982122
setupStore1538770200177657
numNetworkReqs813718335101150
WebpackStandard HomeuiStartup15321354208313815711814
load13261153163810213831522
domContentLoaded13261153163710213831521
domInteractive722416340100134
firstPaint------
backgroundConnect5221150255999
firstReactRender13102321317
initialActions2043412
loadScripts1302113816199813621496
setupStore12576101129
numNetworkReqs231298181768
WebpackPower User HomeuiStartup27771935520546530103560
load15731279261230017012258
domContentLoaded15731279261230017012258
domInteractive16430839177156599
firstPaint------
backgroundConnect3859013243076071010
firstReactRender21153642429
initialActions203123
loadScripts15291254258429016332190
setupStore21481177242328764
numNetworkReqs793917933100137
📊 Page Load Benchmark Results

Current Commit: 58e9fd3 | Date: 2/11/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±38ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 732ms (±35ms) 🟢 | historical mean value: 725ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±12ms) 🟢 | historical mean value: 78ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 38ms 1.03s 1.34s 1.09s 1.34s
domContentLoaded 732ms 35ms 710ms 996ms 772ms 996ms
firstPaint 79ms 12ms 68ms 196ms 88ms 196ms
firstContentfulPaint 79ms 12ms 68ms 196ms 88ms 196ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 489 Bytes (0.01%)
  • ui: 3.61 KiB (0.04%)
  • common: 1.81 KiB (0.02%)

Copy link

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

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Feb 12, 2026

Builds ready [10cb57e]
UI Startup Metrics (1406 ± 106 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup14061209182210614731592
load1216102215839712641365
domContentLoaded1209101815749612581355
domInteractive2816135202378
firstPaint163651340139214254
backgroundConnect25122142533252283
firstReactRender15102531721
initialActions104112
loadScripts97878913089510311116
setupStore1253651419
numNetworkReqs221591201578
BrowserifyPower User HomeuiStartup17101346243117217522084
load11501023199517611281576
domContentLoaded11351012198017411101564
domInteractive37191963333117
firstPaint168681081123209344
backgroundConnect31527749530324359
firstReactRender22165062236
initialActions102111
loadScripts89677416601638751293
setupStore1473551624
numNetworkReqs1094925847135217
WebpackStandard HomeuiStartup88771913491259721125
load7606411264118822952
domContentLoaded7546381254118818946
domInteractive2817109192479
firstPaint1046120738118189
backgroundConnect28186093244
firstReactRender16113551924
initialActions105112
loadScripts7516351252117814944
setupStore1353461523
numNetworkReqs2315101211583
WebpackPower User HomeuiStartup1221908192717412931534
load7076111489132690964
domContentLoaded6986031481132681958
domInteractive36181753036117
firstPaint1246647773127284
backgroundConnect16613039051163292
firstReactRender22173432428
initialActions103111
loadScripts6966011471130679948
setupStore1254151417
numNetworkReqs1144528351142227
FirefoxBrowserifyStandard HomeuiStartup15341304221017815561944
load13221123195613813641582
domContentLoaded13201123195113813641581
domInteractive64312424084137
firstPaint------
backgroundConnect5428134205691
firstReactRender12102311213
initialActions102012
loadScripts12971096192913613381557
setupStore156132201345
numNetworkReqs241292211786
BrowserifyPower User HomeuiStartup27542193399236828283584
load16101311242523016742124
domContentLoaded16091310242523016742123
domInteractive1174053384119296
firstPaint------
backgroundConnect228121902154224598
firstReactRender20156972025
initialActions203122
loadScripts15671284239922216342068
setupStore1599724203182616
numNetworkReqs64351523386127
WebpackStandard HomeuiStartup17711451229016818362052
load15251257188212815771751
domContentLoaded15251257188212815761751
domInteractive993333748134149
firstPaint------
backgroundConnect63282053468128
firstReactRender15122731623
initialActions103122
loadScripts14921234183512015471710
setupStore177171201547
numNetworkReqs231287191876
WebpackPower User HomeuiStartup26641950794465827623426
load15921284674158316612217
domContentLoaded15911284674158316602216
domInteractive13433671145110534
firstPaint------
backgroundConnect214101822139212498
firstReactRender21153242428
initialActions207122
loadScripts15511259671657516292183
setupStore18381054229228708
numNetworkReqs63351343193120
📊 Page Load Benchmark Results

Current Commit: 10cb57e | Date: 2/12/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±39ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 723ms (±37ms) 🟢 | historical mean value: 728ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±12ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 39ms 1.02s 1.32s 1.06s 1.32s
domContentLoaded 723ms 37ms 704ms 1.00s 742ms 1.00s
firstPaint 76ms 12ms 60ms 172ms 84ms 172ms
firstContentfulPaint 76ms 12ms 60ms 172ms 84ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 300.53 KiB (7.5%)
  • ui: 4.54 KiB (0.05%)
  • common: 7.99 KiB (0.07%)

Copy link
Contributor

@vinnyhoward vinnyhoward left a comment

Choose a reason for hiding this comment

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

Very clean. LGTM

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

CODEOWNER changes LGTM!

@PatrykLucka PatrykLucka added this pull request to the merge queue Feb 13, 2026
Merged via the queue into main with commit 8d4a8f7 Feb 13, 2026
176 checks passed
@PatrykLucka PatrykLucka deleted the custom-claim-transaction-toast branch February 13, 2026 20:22
@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2026
@metamaskbot metamaskbot added the release-13.20.0 Issue or pull request that will be included in release 13.20.0 label Feb 13, 2026
@chloeYue chloeYue added team-earn and removed team-mobile-ux Mobile UX team labels Feb 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants