-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat(STX-331): replace legacy STX swaps flags with smart transaction flags from remote config API #38572
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
base: main
Are you sure you want to change the base?
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 (2 files, +28 -16)
💸 @MetaMask/transactions (4 files, +74 -156)
|
af7b80f to
a940b01
Compare
|
|
||
| Promise.all([ | ||
| // TODO: check if this is still needed. | ||
| fetchSwapsFeatureFlags(), |
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.
I kept this for now and the setSwapsFeatureFlags dispatch cause I am not sure if it is read at some point in the codebase
a940b01 to
240a093
Compare
| ); | ||
|
|
||
| // TODO: Replace. Currently, this checks an hardcoded list in the client. | ||
| const currentChainSupportsSmartTransactions = useSelector( |
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.
@dan437 , do we still have a use case for this?
daad80d to
390d595
Compare
390d595 to
1ee27ad
Compare
…flags from remote config API
1ee27ad to
d93fcd9
Compare
Description
Upgrades
@metamask/smart-transactions-controllerand consolidates feature flag logic by delegating to the controller's built-in selector (selectSmartTransactionsFeatureFlagsForChain).Key changes:
getSmartTransactionsFeatureFlagsForChainto wrap the controller's selector, which handles validation and merging of default + chain-specific configThis removes the usage of the smart-transactions section of the swaps feature flags. No functional changes are expected.
Dependency on MetaMask/smart-transactions-controller#550. The smart-controller-version will have to be updated.
Changelog
CHANGELOG entry: upgrade smart-transactions-controller and replace the legacy smart transactions swaps flag with smart transactions flag from remote config API.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist