Skip to content

Commit cc4b606

Browse files
authored
Merge branch 'main' into TSA-pass-chain-value-to-top-trader-events
2 parents 928fccb + 52f3842 commit cc4b606

267 files changed

Lines changed: 10084 additions & 6382 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.depcheckrc.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ ignores:
4646
- 'xml2js'
4747
# jest-junit is used as a Jest reporter in tests/jest.e2e.detox.config.js
4848
- 'jest-junit'
49+
# Required directly only by scripts/babel/named-capturing-groups-regex.test.ts
50+
# (a regression guard for the @react-native/babel-preset patch). It's provided
51+
# transitively via @expo/metro-config + Metro, so we don't declare it as a
52+
# direct dependency.
53+
- 'babel-preset-expo'
4954

5055
# tsconfig path alias pointing to app/controllers/perps (not an npm package)
5156
- '@metamask/perps-controller'
@@ -76,7 +81,6 @@ ignores:
7681
- 'chromedriver'
7782
- 'execa'
7883
- 'jetifier'
79-
- 'metro-react-native-babel-preset'
8084
- 'react-native-svg-asset-plugin'
8185
- 'regenerator-runtime'
8286
- 'prettier-2'

.eslintrc.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,12 @@ const utilNumberImportBurndownFiles = [
9393
'app/components/UI/Stake/hooks/useBalance.ts',
9494
'app/components/UI/Tokens/util/deriveBalanceFromAssetMarketDetails.test.ts',
9595
'app/components/UI/Tokens/util/deriveBalanceFromAssetMarketDetails.ts',
96-
'app/components/UI/TransactionElement/utils-gas.js',
97-
'app/components/UI/TransactionElement/utils.js',
9896
'app/components/UI/UrlAutocomplete/Result.tsx',
9997
'app/components/Views/GasEducationCarousel/index.js',
10098
'app/components/Views/NetworksManagement/NetworkDetailsView/hooks/useNetworkValidation.ts',
10199
'app/components/Views/SocialLeaderboard/TraderPositionView/components/QuickBuyBottomSheet/useQuickBuyBottomSheet.ts',
102100
'app/components/Views/SocialLeaderboard/TraderPositionView/components/QuickBuyBottomSheet/useQuickBuyQuotes.ts',
103101
'app/components/Views/SocialLeaderboard/utils/formatters.ts',
104-
'app/components/Views/UnifiedTransactionsView/useUnifiedTxActions.test.ts',
105102
'app/components/Views/confirmations/components/gas/max-base-fee-input/max-base-fee-input.tsx',
106103
'app/components/Views/confirmations/components/gas/priority-fee-input/priority-fee-input.tsx',
107104
'app/components/Views/confirmations/components/info/typed-sign-v3v4/simulation/components/native-value-display/native-value-display.tsx',
@@ -133,10 +130,9 @@ const utilNumberImportBurndownFiles = [
133130
// `../number/bigint` (or `./number/bigint` from `app/util/`).
134131
'app/util/confirm-tx.js',
135132
'app/util/conversions.js',
136-
'app/util/confirmation/gas.ts',
133+
137134
'app/util/confirmation/transactions.ts',
138135
'app/util/custom-gas/index.js',
139-
'app/util/networks/index.js',
140136
'app/util/transactions/index.js',
141137
'app/util/transactions/index.test.ts',
142138
];

.github/workflows/ci.yml

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -307,22 +307,6 @@ jobs:
307307
command: yarn install --immutable
308308
- name: Clean state and following up dependencies installation
309309
run: yarn setup:github-ci --node
310-
- name: Restore ESLint cache
311-
if: ${{ matrix.scripts == 'lint' }}
312-
uses: actions/cache@v4
313-
with:
314-
path: .eslintcache
315-
key: eslintcache-${{ runner.os }}-${{ github.run_id }}
316-
restore-keys: |
317-
eslintcache-${{ runner.os }}-
318-
- name: Restore TypeScript incremental build cache
319-
if: ${{ matrix.scripts == 'lint:tsc' }}
320-
uses: actions/cache@v4
321-
with:
322-
path: tsconfig.tsbuildinfo
323-
key: tsbuildinfo-${{ runner.os }}-${{ github.run_id }}
324-
restore-keys: |
325-
tsbuildinfo-${{ runner.os }}-
326310
- run: yarn ${{ matrix['scripts'] }}
327311
- name: Require clean working directory
328312
shell: bash
@@ -1354,13 +1338,7 @@ jobs:
13541338
permissions:
13551339
contents: read
13561340
id-token: write
1357-
needs:
1358-
[
1359-
get_requirements,
1360-
build-android-apks,
1361-
smart-e2e-selection,
1362-
prepare-e2e-timings,
1363-
]
1341+
needs: [get_requirements, build-android-apks, smart-e2e-selection, prepare-e2e-timings]
13641342
uses: ./.github/workflows/run-e2e-smoke-tests-android.yml
13651343
with:
13661344
changed_files: ${{ needs.get_requirements.outputs.changed_files }}
@@ -1414,13 +1392,7 @@ jobs:
14141392
permissions:
14151393
contents: read
14161394
id-token: write
1417-
needs:
1418-
[
1419-
get_requirements,
1420-
ios-tests-ready,
1421-
smart-e2e-selection,
1422-
prepare-e2e-timings,
1423-
]
1395+
needs: [get_requirements, ios-tests-ready, smart-e2e-selection, prepare-e2e-timings]
14241396
uses: ./.github/workflows/run-e2e-smoke-tests-ios.yml
14251397
with:
14261398
changed_files: ${{ needs.get_requirements.outputs.changed_files }}

.github/workflows/create-release-pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ jobs:
109109
# - contents: write → push the release / version-bump / changelog branches
110110
# - pull_requests: write → open the release PRs
111111
# - members: read → auto-changelog --autoCategorize resolves PR author teams (read:org)
112+
# - workflows: write → the release branch cut here comes from main and can genuinely
113+
# differ in .github/workflows/* from the previous release branch
112114
# OIDC works on every trigger, so no workflow_dispatch vs workflow_call token split is needed.
113115
- name: Get token
114116
id: get-token
@@ -119,6 +121,7 @@ jobs:
119121
contents: write
120122
pull_requests: write
121123
members: read
124+
workflows: write
122125
123126
- name: Create Release PR (semver / native version bump)
124127
if: needs.resolve-bases.outputs.is_ota != 'true'

.github/workflows/run-appium-smoke-tests-android.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,3 +219,27 @@ jobs:
219219
metamask_environment: ${{ inputs.metamask_environment }}
220220
runner_provider: ${{ inputs.runner_provider }}
221221
secrets: inherit
222+
223+
appium-money-android-smoke:
224+
if: >-
225+
${{
226+
!cancelled() &&
227+
(contains(fromJson(inputs.selected_tags), 'ALL') ||
228+
contains(fromJson(inputs.selected_tags), 'SmokeMoney'))
229+
}}
230+
strategy:
231+
matrix:
232+
split: [1]
233+
fail-fast: false
234+
uses: ./.github/workflows/run-appium-e2e-workflow.yml
235+
with:
236+
test-suite-name: appium-money-android-smoke-${{ matrix.split }}
237+
platform: android
238+
test_suite_tag: SmokeMoney
239+
split_number: ${{ matrix.split }}
240+
total_splits: 1
241+
test-timeout-minutes: 60
242+
build_type: ${{ inputs.build_type }}
243+
metamask_environment: ${{ inputs.metamask_environment }}
244+
runner_provider: ${{ inputs.runner_provider }}
245+
secrets: inherit

.github/workflows/run-appium-smoke-tests-ios.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,3 +198,27 @@ jobs:
198198
metamask_environment: ${{ inputs.metamask_environment || 'e2e' }}
199199
runner_provider: ${{ inputs.runner_provider || 'current' }}
200200
secrets: inherit
201+
202+
appium-money-ios-smoke:
203+
if: >-
204+
${{
205+
!cancelled() &&
206+
(contains(fromJson(inputs.selected_tags || '["ALL"]'), 'ALL') ||
207+
contains(fromJson(inputs.selected_tags || '["ALL"]'), 'SmokeMoney'))
208+
}}
209+
strategy:
210+
matrix:
211+
split: [1]
212+
fail-fast: false
213+
uses: ./.github/workflows/run-appium-e2e-workflow.yml
214+
with:
215+
test-suite-name: appium-money-ios-smoke-${{ matrix.split }}
216+
platform: ios
217+
test_suite_tag: SmokeMoney
218+
split_number: ${{ matrix.split }}
219+
total_splits: 1
220+
test-timeout-minutes: 60
221+
build_type: ${{ inputs.build_type || 'main' }}
222+
metamask_environment: ${{ inputs.metamask_environment || 'e2e' }}
223+
runner_provider: ${{ inputs.runner_provider || 'current' }}
224+
secrets: inherit

.github/workflows/update-release-changelog.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ jobs:
5454
pull-requests: write
5555
id-token: write
5656
steps:
57+
# Mint a short-lived token via the token-exchange service (OIDC). It needs:
58+
# - contents: write → push the changelog branch
59+
# - pull_requests: write → open/update the changelog PR
60+
# - workflows: write → workaround for a GitHub push-protection timeout bug on new
61+
# branch pushes (see actions/checkout#2287); this step never
62+
# actually touches workflow files.
5763
- name: Get token
5864
id: get-token
5965
uses: MetaMask/github-tools/.github/actions/get-token@v1
@@ -62,6 +68,7 @@ jobs:
6268
permissions: |
6369
contents: write
6470
pull_requests: write
71+
workflows: write
6572
6673
- name: Checkout release branch
6774
uses: actions/checkout@v4
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/src/configs/main.js b/src/configs/main.js
2+
index a2f5e1e53a663c07ce8fa3def3a1d6d7828a4557..5179e8cf5bb6f085275daa183a05d21553cf695a 100644
3+
--- a/src/configs/main.js
4+
+++ b/src/configs/main.js
5+
@@ -120,9 +120,14 @@ const getPreset = (src, options) => {
6+
extraPlugins.push([require('@babel/plugin-transform-numeric-separator')]);
7+
extraPlugins.push([require('@babel/plugin-transform-sticky-regex')]);
8+
} else {
9+
- extraPlugins.push([
10+
- require('@babel/plugin-transform-named-capturing-groups-regex'),
11+
- ]);
12+
+ // NOTE (MetaMask): Do NOT down-level named-capture-group regexes on Hermes.
13+
+ // Current Hermes supports them natively, and the `@babel/runtime/helpers/wrapRegExp`
14+
+ // helper that this transform introduces breaks under SES lockdown (frozen
15+
+ // intrinsics), causing `RegExp.exec` to return null for matching strings
16+
+ // (e.g. NetworkController's INFURA_URL_REGEX -> "Could not derive Infura network").
17+
+ // extraPlugins.push([
18+
+ // require('@babel/plugin-transform-named-capturing-groups-regex'),
19+
+ // ]);
20+
// Needed for regenerator
21+
if (isHermes && enableRegenerator) {
22+
extraPlugins.push([

.yarn/patches/@tommasini-react-native-scrollable-tab-view-npm-1.1.1-153a9df479.patch

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ index 81a8a70576a2336fbfce44f429b80acb6bacb2c1..f8916b181efe7ba4ab598d3e6fb11477
5454
borderTopWidth: 0,
5555
borderLeftWidth: 0,
5656
diff --git a/index.js b/index.js
57-
index dc9d4f4e0bb7b5a165e0bcc89133e4bf6cdfff91..496530970bce3754e76362737be4c3491d159f05 100644
57+
index dc9d4f4e0bb7b5a165e0bcc89133e4bf6cdfff91..94f7ac60e15478b197aa3f537224745d0d5fecb6 100644
5858
--- a/index.js
5959
+++ b/index.js
6060
@@ -13,17 +13,14 @@ const {
@@ -98,3 +98,12 @@ index dc9d4f4e0bb7b5a165e0bcc89133e4bf6cdfff91..496530970bce3754e76362737be4c349
9898
)}
9999
ref={(scrollView) => { this.scrollView = scrollView; }}
100100
{...this.props.contentProps}
101+
@@ -348,7 +342,7 @@ const ScrollableTabView = createReactClass({
102+
// Need to call __makeNative manually to avoid a native animated bug. See
103+
// https://github.com/facebook/react-native/pull/14435
104+
containerWidthAnimatedValue.__makeNative();
105+
- scrollValue = Animated.divide(this.state.scrollXIOS, containerWidthAnimatedValue);
106+
+ const scrollValue = Animated.divide(this.state.scrollXIOS, containerWidthAnimatedValue);
107+
this.setState({ containerWidth: width, scrollValue, });
108+
} else {
109+
this.setState({ containerWidth: width, });

app/actions/settings/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,10 @@ export function setPerpsChartPreferredCandlePeriod(preferredCandlePeriod) {
107107
preferredCandlePeriod,
108108
};
109109
}
110+
111+
export function setShowAccountOnLeaderboard(showAccountOnLeaderboard) {
112+
return {
113+
type: 'SET_SHOW_ACCOUNT_ON_LEADERBOARD',
114+
showAccountOnLeaderboard,
115+
};
116+
}

0 commit comments

Comments
 (0)