feat(STX-583): move STX allowed RPC hosts config to flags#30812
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. |
d047e7a to
5646b46
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit abe1250. Configure here.
1f550f4 to
7021944
Compare
6185675 to
faa791b
Compare
weitingsun
left a comment
There was a problem hiding this comment.
mobile-platform codeowner file .github/scripts/known-feature-flag-constants.ts LGTM
d697e91 to
c4aab0b
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The default behavior is preserved (same hosts as before), so risk is medium rather than high. The feature flag registry update ensures E2E tests get production-accurate defaults. No other areas (accounts, identity, network, browser, snaps) are affected by this change. Performance Test Selection: |

Description
Move to LD flag for allowed RPC host for STX.
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Production smart-transaction eligibility now depends on a remotely updatable RPC host list; misconfiguration could enable or disable STX for large user segments on specific networks.
Overview
Smart transactions allowed RPC hosts move from hardcoded Infura/Binance suffix checks to the remote flag
smartTransactionsAllowedRpcHosts, with client defaults.infura.ioand.binance.orgwhen the flag is missing or invalid.A new selector resolves the host list and
selectSmartTransactionsEnabledpasses it intogetIsAllowedRpcUrlForSmartTransactions, which now takes an explicit allowlist: entries starting with.match host suffixes; other entries require an exact hostname match (so related subdomains like developer-access hosts are not implied). Non-production builds still allow any RPC URL.The change is wired into the feature-flag registry, CI known-flag constants, and unit tests for the selector and RPC helper.
Reviewed by Cursor Bugbot for commit eee03bb. Bugbot is set up for automated code reviews on this repo. Configure here.