Skip to content

fix: refetch subscription on update payment card close tab#39814

Merged
chaitanyapotti merged 1 commit intomainfrom
fix/shield-update-card-payment-refetch
Feb 5, 2026
Merged

fix: refetch subscription on update payment card close tab#39814
chaitanyapotti merged 1 commit intomainfrom
fix/shield-update-card-payment-refetch

Conversation

@tuna1207
Copy link
Copy Markdown
Member

@tuna1207 tuna1207 commented Feb 5, 2026

Description

In shield subscription, we are missing subscription reload after user close tab and back to metamask from card update tab
This PR handle subscription reload even if user close tab only in card payment update tab

Open in GitHub Codespaces

Changelog

CHANGELOG entry: handle subscription reload when user close shield card payment update stripe tab

Related issues

Fixes:

Manual testing steps

  1. Subscribe to shield
  2. When subscription is past due
  3. Change payment method open stripe payment tab
  4. Change to new accepted card
  5. Close tab insead of press back to metamask
  6. new subscription active status should be reloaded

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

Low Risk
Small control-flow change limited to the card payment-method update flow; main risk is unintentionally swallowing non-tab-close errors and masking failures.

Overview
Fixes Shield card payment-method updates so subscriptions are still re-fetched when the Stripe tab is closed manually (instead of waiting for a redirect).

updateSubscriptionCardPaymentMethod now catches the specific SHIELD_ERROR.tabActionFailed case from #openAndWaitForTabToClose and continues the flow, while rethrowing other errors.

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

@metamaskbot metamaskbot added the team-onboarding Onboarding team label Feb 5, 2026
@tuna1207 tuna1207 added area-shield team-shield Shield team and removed team-onboarding Onboarding team labels Feb 5, 2026
@tuna1207 tuna1207 marked this pull request as ready for review February 5, 2026 05:37
@github-actions github-actions bot added the size-S label Feb 5, 2026
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Feb 5, 2026

Builds ready [f9cb776]
UI Startup Metrics (1338 ± 121 ms)
PlatformBuildTypePageMetricTest Title (ms)Persona (ms)Mean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--13381092171212114101542
load--1148927145110912171340
domContentLoaded--1140920144510912091331
domInteractive--2614133202176
firstPaint--210601225207200333
backgroundConnect--21719926112222242
firstReactRender--1693041822
initialActions--105113
loadScripts--939724123610810101132
setupStore--1264061426
numNetworkReqs--2315101221586
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--17241397356023717532117
load--11231011167014111111539
domContentLoaded--11071004166013610991500
domInteractive--33171392332101
firstPaint--192651556199234345
backgroundConnect--3242751337108319420
firstReactRender--23155792545
initialActions--104112
loadScripts--87377813881238661228
setupStore--1584471729
numNetworkReqs--82432614188191
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--85067811111069441034
load--7135961007100792915
domContentLoaded--70859198898787906
domInteractive--261691172278
firstPaint--1106283485130204
backgroundConnect--3316132203776
firstReactRender--16103961729
initialActions--107113
loadScripts--70558998298777904
setupStore--1153651222
numNetworkReqs--231595211586
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--1234854197321013401727
load--71261511741177051045
domContentLoaded--70360911691176961036
domInteractive--35181422634111
firstPaint--1406552692177345
backgroundConnect--17012942164162338
firstReactRender--22183832427
initialActions--102111
loadScripts--70060711611156931027
setupStore--1253341317
numNetworkReqs--1174528255146268
19--------
FirefoxBrowserifyStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16291322214317517441980
load--13721168190814414521598
domContentLoaded--13711168190814414521592
domInteractive--74332103791144
firstPaint--------
backgroundConnect--762621444107169
firstReactRender--1292831218
initialActions--102022
loadScripts--13301154184913313931560
setupStore--13667131242
numNetworkReqs--2512101231890
19--------
BrowserifyPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--27651984430250029823823
load--15491211241028417352214
domContentLoaded--15481204241028417352214
domInteractive--12334703131109488
firstPaint--------
backgroundConnect--2981131052241338904
firstReactRender--191410791923
initialActions--103122
loadScripts--15021186231426316152146
setupStore--1166772176100606
numNetworkReqs--66361603486140
19--------
WebpackStandard Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--16281385217615817121932
load--13971183165510414691594
domContentLoaded--13971183165510414691588
domInteractive--933323442132153
firstPaint--------
backgroundConnect--62231883676147
firstReactRender--14112221517
initialActions--102022
loadScripts--1360116816119814231537
setupStore--216228371391
numNetworkReqs--241290201885
19--------
WebpackPower User Home0--------
1--------
2--------
3--------
4--------
5--------
6--------
7--------
8--------
9--------
10--------
11--------
12--------
13--------
14--------
15--------
16--------
17--------
18--------
uiStartup--27871923711467031923940
load--15931212577156117242487
domContentLoaded--15931212577156117242487
domInteractive--141301887227109629
firstPaint--------
backgroundConnect--3401131380284399933
firstReactRender--22166572330
initialActions--206123
loadScripts--15411191574554516222436
setupStore--2007813239337715
numNetworkReqs--64361953587133
19--------
📊 Page Load Benchmark Results

Current Commit: f9cb776 | Date: 2/5/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±36ms) 🟡 | historical mean value: 1.03s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 718ms (±34ms) 🟢 | historical mean value: 723ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±12ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 36ms 1.00s 1.29s 1.06s 1.29s
domContentLoaded 718ms 34ms 696ms 962ms 737ms 962ms
firstPaint 76ms 12ms 60ms 184ms 84ms 184ms
firstContentfulPaint 76ms 12ms 60ms 184ms 84ms 184ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 121 Bytes (0%)
  • ui: -1 Bytes (0%)
  • common: 2.5 KiB (0.03%)

@chaitanyapotti chaitanyapotti added this pull request to the merge queue Feb 5, 2026
Merged via the queue into main with commit 5e6d11a Feb 5, 2026
199 of 201 checks passed
@chaitanyapotti chaitanyapotti deleted the fix/shield-update-card-payment-refetch branch February 5, 2026 08:40
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2026
@metamaskbot metamaskbot added the release-13.18.0 Issue or pull request that will be included in release 13.18.0 label Feb 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-shield release-13.18.0 Issue or pull request that will be included in release 13.18.0 size-S team-shield Shield team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants