Skip to content

Conversation

@lionellbriones
Copy link
Contributor

@lionellbriones lionellbriones commented Nov 7, 2025

Description

If user has no shield subscription and click on Settings > Transaction Shield, show Shield entry modal instead of redirecting to Shield plan page.

On this case, Shield entry modal is just a normal modal and does not affect existing conditions on showing the entry modal.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Add Shield entry modal to settings page

Related issues

Fixes:

Manual testing steps

  1. Login to metamask
  2. Go to Menu > Settings
  3. Click on Transaction Shield
  4. Should show Shield entry modal

Screenshots/Recordings

Before

After

User without Shield subscription

settings-shield-modal.mov

Subscribed user

settings-shield-has-subs.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

Cursor Bugbot is generating a summary for commit 7a1fc95. Configure here.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

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-web3auth Web3Auth team label Nov 7, 2025
@github-actions github-actions bot added the size-S label Nov 7, 2025
if (key === TRANSACTION_SHIELD_ROUTE && !hasShieldSubscription) {
this.setState({ showShieldEntryModal: true });
return;
}
Copy link

Choose a reason for hiding this comment

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

Bug: Shield Subscription Status Blocks Access Modal

The condition !hasShieldSubscription prevents the modal from showing for users with paused, cancelled, or past_due subscriptions. Since getHasShieldSubscription returns true for any subscription regardless of status, users with inactive subscriptions won't see the entry modal but also can't access the Transaction Shield page, leaving them unable to manage their subscription.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

User with existing shield subscription should redirect to Transaction Shield page. We have different UI inside Transaction Shield page to show those states

@metamaskbot
Copy link
Collaborator

Builds ready [7a1fc95]
UI Startup Metrics (1223 ± 87 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1223107814658712751384
load105993612387711071200
domContentLoaded105293312277611021194
domInteractive211484131856
firstPaint630159121141510661178
backgroundConnect23121730912234244
firstReactRender24194352638
getState2074982337
initialActions003001
loadScripts828709100176877967
setupStore1063231115
numNetworkReqs1367520673
BrowserifyPower User HomeuiStartup19171738260026822232600
load1025891139918112551399
domContentLoaded1017885138817812411388
domInteractive291581225081
firstPaint639176140448412561404
backgroundConnect23621826312245263
firstReactRender27253012730
getState17615422021199220
initialActions001011
loadScripts793665115117510161151
setupStore1191311213
numNetworkReqs1197125675240256
WebpackStandard HomeuiStartup8256941218948281048
load605552100185596826
domContentLoaded59854797381591807
domInteractive161163101439
firstPaint21256976210201807
backgroundConnect241071142463
firstReactRender29176883437
getState1053031214
initialActions001001
loadScripts59554596378589797
setupStore1153141319
numNetworkReqs1367519870
WebpackPower User HomeuiStartup12841116180217114131802
load671585971127705971
domContentLoaded651571934111696934
domInteractive32121343837134
firstPaint35477937281619937
backgroundConnect48121643856164
firstReactRender27243022830
getState1396117130158171
initialActions001011
loadScripts647569923107685923
setupStore1062561125
numNetworkReqs1077121248162212
FirefoxBrowserifyStandard HomeuiStartup14461272191713514871759
load1218110114318512631402
domContentLoaded1218110114318512621402
domInteractive1163438159116256
firstPaint------
backgroundConnect4126109164887
firstReactRender26214142739
getState83589730
initialActions001011
loadScripts1193108014068112341370
setupStore14770101335
numNetworkReqs1266315760
BrowserifyPower User HomeuiStartup26232280360038427943600
load15141296193922017541939
domContentLoaded15141295193922017531939
domInteractive22793637191394637
firstPaint------
backgroundConnect12631350102254350
firstReactRender43337084570
getState14310818824167188
initialActions001011
loadScripts14651210190922717271909
setupStore3571594348159
numNetworkReqs1307131682176316
WebpackStandard HomeuiStartup19991708280019220712345
load17121472216813718121964
domContentLoaded17121472216713718111963
domInteractive1123929239122199
firstPaint------
backgroundConnect68293634170144
firstReactRender3725147193594
getState95637917
initialActions001001
loadScripts16701434203313117681908
setupStore236261391689
numNetworkReqs1367118765
WebpackPower User HomeuiStartup25172283294618127292946
load15601306191517017001915
domContentLoaded15591305191517017001915
domInteractive15239427120202427
firstPaint------
backgroundConnect843322852117228
firstReactRender41305685056
getState1178117726141177
initialActions102112
loadScripts15261273183716116711837
setupStore22571214071
numNetworkReqs1306631378217313
📊 Page Load Benchmark Results

Current Commit: 7a1fc95 | Date: 11/7/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±39ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 741ms (±37ms) 🟢 | historical mean value: 718ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±10ms) 🟢 | historical mean value: 76ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 39ms 1.03s 1.34s 1.10s 1.34s
domContentLoaded 741ms 37ms 717ms 1.01s 779ms 1.01s
firstPaint 79ms 10ms 64ms 164ms 88ms 164ms
firstContentfulPaint 79ms 10ms 64ms 164ms 88ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 732 Bytes (0.01%)
  • common: 46 Bytes (0%)

}

export function getHasShieldSubscription(state: SubscriptionState): boolean {
const shieldSubscription = getShieldSubscription(
Copy link
Member

Choose a reason for hiding this comment

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

is this logic right @tuna1207 @lwin-kyaw

we don't wanna show the modal if the user has subscribed to shield atleast once

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants