Skip to content

Commit cb8faa3

Browse files
committed
Merge branch 'main' of github.com:MetaMask/metamask-mobile into chore/respect-js-env-build-variants
2 parents b93a138 + efe74c4 commit cb8faa3

File tree

936 files changed

+35805
-15798
lines changed

Some content is hidden

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

936 files changed

+35805
-15798
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- cron: '0 2-6 * * *'
1212

1313
concurrency:
14-
group: ${{ github.workflow }}-${{ github.ref }}
14+
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.sha || github.ref }}
1515
cancel-in-progress: ${{ !(contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/heads/stable')) }}
1616

1717
jobs:
@@ -108,7 +108,7 @@ jobs:
108108
scripts:
109109
- lint
110110
- lint:tsc
111-
- format:check:changed
111+
- format:check
112112
- audit:ci
113113
- test:depcheck
114114
- test:tgz-check
@@ -470,30 +470,9 @@ jobs:
470470
- name: Check workflow files
471471
run: ${{ steps.download-actionlint.outputs.executable }} -color -config-file .github/actionlint.yaml
472472
shell: bash
473-
all-jobs-pass-merge-pr:
474-
name: All jobs pass
475-
runs-on: ubuntu-latest
476-
if: ${{ github.event_name != 'merge_group' }}
477-
needs:
478-
[
479-
check-diff,
480-
dedupe,
481-
scripts,
482-
unit-tests,
483-
check-workflows,
484-
js-bundle-size-check,
485-
sonar-cloud-quality-gate-status,
486-
]
487-
outputs:
488-
ALL_JOBS_PASSED: ${{ steps.jobs-passed-status.outputs.ALL_JOBS_PASSED }}
489-
steps:
490-
- name: Set jobs passed status
491-
id: jobs-passed-status
492-
run: echo "ALL_JOBS_PASSED=true" >> "$GITHUB_OUTPUT"
493473
all-jobs-pass:
494-
name: All jobs pass (merge_group)
474+
name: All jobs pass
495475
runs-on: ubuntu-latest
496-
if: ${{ github.event_name == 'merge_group' }}
497476
needs:
498477
[
499478
check-diff,
@@ -510,19 +489,19 @@ jobs:
510489
- name: Set jobs passed status
511490
id: jobs-passed-status
512491
run: echo "ALL_JOBS_PASSED=true" >> "$GITHUB_OUTPUT"
513-
check-all-jobs-pass-merge-pr:
492+
check-all-jobs-pass:
514493
name: Check all jobs pass
515-
if: ${{ github.event_name != 'merge_group' && always() }}
494+
if: ${{ always() }}
516495
runs-on: ubuntu-latest
517496
needs:
518-
- all-jobs-pass-merge-pr
497+
- all-jobs-pass
519498
- needs_e2e_build
520499
- e2e-smoke-tests-android
521500
- e2e-smoke-tests-ios
522501
steps:
523502
- run: |
524503
# Check if all non-E2E jobs passed
525-
if [[ "${{ needs.all-jobs-pass-merge-pr.outputs.ALL_JOBS_PASSED }}" != "true" ]]; then
504+
if [[ "${{ needs.all-jobs-pass.outputs.ALL_JOBS_PASSED }}" != "true" ]]; then
526505
echo "Non-E2E jobs failed"
527506
exit 1
528507
fi
@@ -540,19 +519,6 @@ jobs:
540519
fi
541520
542521
echo "All required jobs passed"
543-
check-all-jobs-pass:
544-
name: Check all jobs pass (merge_group)
545-
runs-on: ubuntu-latest
546-
needs: all-jobs-pass
547-
if: ${{ github.event_name == 'merge_group' && always() }}
548-
steps:
549-
- run: |
550-
if [[ "${{ needs.all-jobs-pass.outputs.ALL_JOBS_PASSED }}" == "true" ]]; then
551-
echo "All jobs passed. Unblock PR."
552-
else
553-
echo "All jobs passed step skipped. Block PR."
554-
exit 1
555-
fi
556522
557523
log-merge-group-failure:
558524
name: Log merge group failure

.github/workflows/run-e2e-regression-tests-android.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ jobs:
2323
contents: read
2424
id-token: write
2525
uses: ./.github/workflows/build-android-e2e.yml
26+
with:
27+
build_type: 'main'
28+
metamask_environment: 'e2e'
29+
keystore_target: 'qa'
2630
secrets: inherit
2731

2832
regression-confirmations-android:

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,21 @@ jobs:
119119
changed_files: ${{ inputs.changed_files }}
120120
secrets: inherit
121121

122+
prediction-market-android-smoke:
123+
strategy:
124+
matrix:
125+
split: [1]
126+
fail-fast: false
127+
uses: ./.github/workflows/run-e2e-workflow.yml
128+
with:
129+
test-suite-name: prediction_market_android_smoke-${{ matrix.split }}
130+
platform: android
131+
test_suite_tag: 'SmokePredictions'
132+
split_number: ${{ matrix.split }}
133+
total_splits: 1
134+
changed_files: ${{ inputs.changed_files }}
135+
secrets: inherit
136+
122137
rewards-android-smoke:
123138
strategy:
124139
matrix:
@@ -146,6 +161,7 @@ jobs:
146161
- network-abstraction-android-smoke
147162
- network-expansion-android-smoke
148163
- confirmations-redesigned-android-smoke
164+
- prediction-market-android-smoke
149165
- rewards-android-smoke
150166
steps:
151167
- name: Checkout

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,21 @@ jobs:
119119
changed_files: ${{ inputs.changed_files }}
120120
secrets: inherit
121121

122+
prediction-market-ios-smoke:
123+
strategy:
124+
matrix:
125+
split: [1]
126+
fail-fast: false
127+
uses: ./.github/workflows/run-e2e-workflow.yml
128+
with:
129+
test-suite-name: prediction_market_ios_smoke-${{ matrix.split }}
130+
platform: ios
131+
test_suite_tag: 'SmokePredictions'
132+
split_number: ${{ matrix.split }}
133+
total_splits: 1
134+
changed_files: ${{ inputs.changed_files }}
135+
secrets: inherit
136+
122137
rewards-ios-smoke:
123138
strategy:
124139
matrix:
@@ -146,6 +161,7 @@ jobs:
146161
- accounts-ios-smoke
147162
- network-abstraction-ios-smoke
148163
- network-expansion-ios-smoke
164+
- prediction-market-ios-smoke
149165
- rewards-ios-smoke
150166
steps:
151167
- name: Checkout

.husky/pre-push

Lines changed: 0 additions & 104 deletions
This file was deleted.

.js.env.example

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
1-
# Sign up and generate your own keys at pubnub.com
2-
# Then rename this file to ".js.env" and rebuild the app
3-
#
4-
# In order for this feature to work properly, you need to
5-
# build metamask-extension from source (https://github.com/MetaMask/metamask-extension)
6-
# and set your the same values there.
7-
#
8-
# For more info take a look at https://github.com/MetaMask/metamask-extension/pull/5955
9-
10-
export MM_PUBNUB_SUB_KEY=""
11-
export MM_PUBNUB_PUB_KEY=""
12-
export MM_FOX_CODE="EXAMPLE_FOX_CODE"
13-
14-
# NOTE: Non-MetaMask only, will need to create an account and generate
15-
# API key at https://infura.io in order to connect to main and test nets.
16-
# More info: https://github.com/MetaMask/metamask-mobile/issues/1984
1+
# NOTE: External contributors only - create account at https://developer.metamask.io,
2+
# generate API key, add API key to MM_INFURA_PROJECT_ID below, then rename this file to ".js.env" and rebuild the app.
3+
# Internal contributors: get .js.env file from 1Password.
174

185
export MM_INFURA_PROJECT_ID="null"
6+
7+
# MetaMask Fox Code
8+
# Used as cryptographic salt automatically by app for encryption and transaction identification
9+
# Internal contributors: get real value from 1Password and add to .js.env if needed
10+
# External contributors: leave as "EXAMPLE_FOX_CODE"
11+
export MM_FOX_CODE="EXAMPLE_FOX_CODE"
12+
1913
export IGNORE_BOXLOGS_DEVELOPMENT="false"
2014

2115
# Sentry.init dsn value
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/dist/constants.cjs b/dist/constants.cjs
2+
index 394aca551c114318741b7b54b04ea357de636f88..b35ea08439b898cfba2ca4d9a5005856d7ac77b3 100644
3+
--- a/dist/constants.cjs
4+
+++ b/dist/constants.cjs
5+
@@ -14,5 +14,6 @@ exports.POPULAR_NETWORKS = [
6+
'0x144',
7+
'0x2a15c308d',
8+
'0x3e7', // HyperEVM (999)
9+
+ '0x8f', // Monad
10+
];
11+
//# sourceMappingURL=constants.cjs.map
12+
diff --git a/dist/constants.mjs b/dist/constants.mjs
13+
index abc923ddd7f6611ccb5353ded80fcf87e1ad969e..68a6f478a5d804ec15c5bfa4897d0aa52245246c 100644
14+
--- a/dist/constants.mjs
15+
+++ b/dist/constants.mjs
16+
@@ -11,5 +11,6 @@ export const POPULAR_NETWORKS = [
17+
'0x144',
18+
'0x2a15c308d',
19+
'0x3e7', // HyperEVM (999)
20+
+ '0x8f', // Monad
21+
];
22+
//# sourceMappingURL=constants.mjs.map
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
diff --git a/dist/TransactionController.cjs b/dist/TransactionController.cjs
2+
index 64d41f16b495a364eeeab7d014758355f9a1a879..9648bde2c018274e6ae082dafef6878a64281776 100644
3+
--- a/dist/TransactionController.cjs
4+
+++ b/dist/TransactionController.cjs
5+
@@ -97,6 +97,12 @@ const metadata = {
6+
includeInDebugSnapshot: false,
7+
usedInUi: false,
8+
},
9+
+ swapsTransactions: {
10+
+ includeInStateLogs: true,
11+
+ persist: true,
12+
+ includeInDebugSnapshot: false,
13+
+ usedInUi: true,
14+
+ },
15+
};
16+
const SUBMIT_HISTORY_LIMIT = 100;
17+
/**
18+
diff --git a/dist/TransactionController.mjs b/dist/TransactionController.mjs
19+
index b74920b6fb915b6cae7e074d80c1f307618238c7..05aaef45926e813c76809b442cd27b481db2fd74 100644
20+
--- a/dist/TransactionController.mjs
21+
+++ b/dist/TransactionController.mjs
22+
@@ -99,6 +99,12 @@ const metadata = {
23+
includeInDebugSnapshot: false,
24+
usedInUi: false,
25+
},
26+
+ swapsTransactions: {
27+
+ includeInStateLogs: true,
28+
+ persist: true,
29+
+ includeInDebugSnapshot: false,
30+
+ usedInUi: true,
31+
+ },
32+
};
33+
const SUBMIT_HISTORY_LIMIT = 100;
34+
/**

.yarnrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ npmPreapprovedPackages:
2525
- "@metamask/*"
2626
- "@metamask-previews/*"
2727
- "@lavamoat/*"
28+
- "@consensys/*"
29+

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,26 @@ To learn how to contribute to the MetaMask codebase, visit our [Contributor Docs
2929

3030
## Getting started
3131

32+
### Infura Project Setup
33+
34+
MetaMask Mobile requires an Infura project ID to connect to blockchain networks.
35+
36+
#### Internal Contributors
37+
38+
1. Grab the `.js.env` file from 1Password, ask around for the correct vault. This file contains the `MM_INFURA_PROJECT_ID`.
39+
40+
#### External Contributors
41+
42+
1. Go to [https://developer.metamask.io](https://developer.metamask.io) and create an account
43+
2. Generate an API key
44+
3. Add API key to `MM_INFURA_PROJECT_ID` in `.js.env.example`
45+
4. Rename `.js.env.example` to `.js.env`
46+
5. Rebuild the app
47+
48+
[!CAUTION]
49+
50+
> Without an Infura project ID, the app cannot connect to blockchain networks.
51+
3252
### Using Expo (recommended)
3353

3454
Expo is the fastest way to start developing. With the Expo framework, developers don't need to compile the native side of the application as before, hence no need for any native environment setup, developers only need to download a precompiled development build and run the javascript bundler. The development build will then connect with the bundler to load the javascript code.

0 commit comments

Comments
 (0)