-
Notifications
You must be signed in to change notification settings - Fork 5.5k
feat(STX-331): extract refresh STX liveness from swaps #38877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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. |
✨ Files requiring CODEOWNER review ✨✅ @MetaMask/confirmations (1 files, +11 -12)
🔄 @MetaMask/swaps-engineers (4 files, +125 -0)
|
26d3cbf to
f51f0b9
Compare
Builds ready [f51f0b9]
UI Startup Metrics (1341 ± 114 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
f51f0b9 to
06b43cd
Compare
06b43cd to
d793927
Compare
Builds ready [d793927]
UI Startup Metrics (1279 ± 111 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
a5d2635 to
37fba49
Compare
Builds ready [37fba49]
UI Startup Metrics (1251 ± 97 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
69844a6 to
70c0637
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
70c0637 to
8594fb6
Compare
Builds ready [8594fb6]
UI Startup Metrics (1268 ± 105 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
cdb3fd3 to
a46f501
Compare
Builds ready [a46f501]
UI Startup Metrics (1284 ± 119 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
a46f501 to
99b7c7a
Compare
91e91d1 to
4716302
Compare
Builds ready [4716302]
UI Startup Metrics (1351 ± 103 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
4716302 to
e540fdb
Compare
Builds ready [e540fdb]
UI Startup Metrics (1273 ± 97 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
OGPoyraz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmation changes LGTM
e540fdb to
59ffa6a
Compare
Builds ready [59ffa6a]
UI Startup Metrics (1281 ± 107 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
59ffa6a to
444d0e7
Compare
Builds ready [444d0e7]
UI Startup Metrics (1377 ± 116 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Separate smart transaction liveness refresh from swap flags. This is part of the migration of STX flags away from swaps. <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> [](https://codespaces.new/MetaMask/metamask-extension/pull/38877?quickstart=1) ## **Changelog** CHANGELOG entry: Added network specific smart transactions liveness check before submitting bridge quotes. <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Separates Smart Transactions (STX) liveness from swaps and makes it chain-specific. > > - Replace global `smartTransactionsState.liveness` with `livenessByChainId`; update `getSmartTransactionsEnabled` to use effective chain ID > - New `useRefreshSmartTransactionsLiveness` hook; invoked by `ui/pages/bridge/index.tsx` to fetch liveness for allowed EVM chains on load/chain change > - Update `useSmartTransactionFeatureFlags` to gate by allowed chain IDs and call `fetchSmartTransactionsLiveness({ chainId })` > - `fetchSmartTransactionsLiveness` now accepts `chainId` (deprecates `networkClientId`) and forwards both to background > - Remove liveness fetch from swaps feature-flag flow; adjust related tests/dispatch counts > - Add `livenessByChainId` to test fixtures and integration init state; update selector tests accordingly > - Bump `@metamask/smart-transactions-controller` to `^21.1.0` > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 444d0e7. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Description
Separate smart transaction liveness refresh from swap flags. This is part of the migration of STX flags away from swaps.
Changelog
CHANGELOG entry: Added network specific smart transactions liveness check before submitting bridge quotes.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Separates Smart Transactions (STX) liveness from swaps and makes it chain-specific.
smartTransactionsState.livenesswithlivenessByChainId; updategetSmartTransactionsEnabledto use effective chain IDuseRefreshSmartTransactionsLivenesshook; invoked byui/pages/bridge/index.tsxto fetch liveness for allowed EVM chains on load/chain changeuseSmartTransactionFeatureFlagsto gate by allowed chain IDs and callfetchSmartTransactionsLiveness({ chainId })fetchSmartTransactionsLivenessnow acceptschainId(deprecatesnetworkClientId) and forwards both to backgroundlivenessByChainIdto test fixtures and integration init state; update selector tests accordingly@metamask/smart-transactions-controllerto^21.1.0Written by Cursor Bugbot for commit 444d0e7. This will update automatically on new commits. Configure here.