Skip to content

Commit c23935b

Browse files
authored
Merge branch 'main' into kureev/MUSD-431-752-money-balance-card
2 parents a624e00 + 2433e3e commit c23935b

495 files changed

Lines changed: 28706 additions & 10202 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.

.eslintrc.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,33 @@ module.exports = {
385385
],
386386
},
387387
},
388+
{
389+
files: ['**/*.test.{js,ts,tsx,jsx}', '**/*.spec.{js,ts,tsx,jsx}'],
390+
plugins: ['jest'],
391+
rules: {
392+
// Prevent new file-based snapshots. Inline snapshots (toMatchInlineSnapshot)
393+
// are still allowed as they keep assertions co-located with the test.
394+
'jest/no-restricted-matchers': [
395+
'error',
396+
{
397+
toMatchSnapshot:
398+
'Use toMatchInlineSnapshot() or an explicit assertion instead. File-based snapshots are being phased out.',
399+
},
400+
],
401+
},
402+
},
403+
{
404+
// Matches CODEOWNERS `**/snaps/**` and `**/Snaps/**` (@MetaMask/core-platform).
405+
// ESLint cannot read CODEOWNERS.
406+
files: [
407+
'**/snaps/**/*.{test,spec}.{js,ts,tsx,jsx}',
408+
'**/Snaps/**/*.{test,spec}.{js,ts,tsx,jsx}',
409+
],
410+
plugins: ['jest'],
411+
rules: {
412+
'jest/no-restricted-matchers': 'off',
413+
},
414+
},
388415
// ── Perps controller Core-alignment override ──
389416
// Enforces the same ESLint rules that Core's @metamask/eslint-config
390417
// applies to packages/perps-controller so that code written in mobile

.github/guidelines/E2E_DECISION_TREE.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ To save infra resources while waiting for static analysis findings and potential
3333
- E2E tests are skipped and merge is blocked while the label is present, **unless** all changes are ignorable-only.
3434
- If E2E tests are needed, they should pass to be able to merge.
3535

36-
## AI test selection
36+
## Smart AI E2E test selection
3737

3838
Runs only when all of the following are true:
3939

@@ -53,3 +53,10 @@ Flakiness detection is applied to modified E2E test files in PRs:
5353
- Modified E2E test files run twice
5454
- It applies to existing test files as well as new test files added in the PR
5555
- It can be disabled by adding the label `skip-e2e-flakiness-detection`. Useful when making large refactors or when changes don't pose flakiness risk.
56+
57+
## Release branches
58+
59+
PRs to release branches (cherry-picked from main) are exempt from the following:
60+
61+
- Label `pr-not-ready-for-e2e` is not applied
62+
- Smart AI E2E selection is skipped - all E2E suites are run (if changes are not ignorable-only, e.g. only docs)

.github/workflows/update-e2e-fixtures.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ jobs:
255255
run: |
256256
IS_TEST='true' NODE_OPTIONS='--experimental-vm-modules' \
257257
yarn detox test -c ios.sim.main.ci --headless \
258-
tests/regression/fixtures/fixture-validation.spec.ts
258+
tests/smoke/fixtures/fixture-validation.spec.ts
259259
env:
260260
PREBUILT_IOS_APP_PATH: artifacts/main-qa-MetaMask.app
261261

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
diff --git a/dist/bridge-status-controller.cjs b/dist/bridge-status-controller.cjs
2+
index c8dcd1f18fd4395b13ac7945e533ae1a92553950..ced9b35dc96c65ffe7ac59d198f4ab2737ae24ac 100644
3+
--- a/dist/bridge-status-controller.cjs
4+
+++ b/dist/bridge-status-controller.cjs
5+
@@ -863,16 +863,27 @@ class BridgeStatusController extends (0, polling_controller_1.StaticIntervalPoll
6+
};
7+
// Record in bridge history with actual transaction metadata
8+
try {
9+
- // Create a bridge transaction metadata that includes the original txId
10+
+ /**
11+
+ * Patch to fix ondo swap activity tab status issue logged at
12+
+ * https://consensyssoftware.atlassian.net/browse/BETR-413
13+
+ *
14+
+ */
15+
+ // Create a bridge transaction metadata keyed by orderUid for intent polling
16+
const bridgeTxMetaForHistory = {
17+
...syntheticMeta,
18+
id: orderUid,
19+
- originalTransactionId: syntheticMeta.id, // Keep original txId for TransactionController updates
20+
};
21+
// Use orderId as the history key for intent transactions
22+
+ // IMPORTANT: pass originalTransactionId as a top-level argument so
23+
+ // `getInitialHistoryItem` reads it. Setting it on `bridgeTxMeta` is a no-op
24+
+ // because `getInitialHistoryItem` destructures `originalTransactionId` from
25+
+ // the top-level args, not from `bridgeTxMeta`. Without this, the field
26+
+ // falls back to `bridgeTxMeta.id` (the orderUid), severing the link between
27+
+ // the bridge history record and the synthetic TransactionController entry.
28+
const historyKey = __classPrivateFieldGet(this, _BridgeStatusController_addTxToHistory, "f").call(this, {
29+
accountAddress,
30+
bridgeTxMeta: bridgeTxMetaForHistory,
31+
+ originalTransactionId: syntheticMeta.id, // Keep original txId for TransactionController updates
32+
quoteResponse,
33+
slippagePercentage: 0,
34+
isStxEnabled: false,
35+
diff --git a/dist/bridge-status-controller.mjs b/dist/bridge-status-controller.mjs
36+
index 3c285a68a35e69b6898f5c811a000324044213c8..9e0b4ef973b167c39e142b60ca28cf32ea89f41a 100644
37+
--- a/dist/bridge-status-controller.mjs
38+
+++ b/dist/bridge-status-controller.mjs
39+
@@ -860,16 +860,27 @@ export class BridgeStatusController extends StaticIntervalPollingController() {
40+
};
41+
// Record in bridge history with actual transaction metadata
42+
try {
43+
- // Create a bridge transaction metadata that includes the original txId
44+
+ /**
45+
+ * Patch to fix ondo swap activity tab status issue logged at
46+
+ * https://consensyssoftware.atlassian.net/browse/BETR-413
47+
+ *
48+
+ */
49+
+ // Create a bridge transaction metadata keyed by orderUid for intent polling
50+
const bridgeTxMetaForHistory = {
51+
...syntheticMeta,
52+
id: orderUid,
53+
- originalTransactionId: syntheticMeta.id, // Keep original txId for TransactionController updates
54+
};
55+
// Use orderId as the history key for intent transactions
56+
+ // IMPORTANT: pass originalTransactionId as a top-level argument so
57+
+ // `getInitialHistoryItem` reads it. Setting it on `bridgeTxMeta` is a no-op
58+
+ // because `getInitialHistoryItem` destructures `originalTransactionId` from
59+
+ // the top-level args, not from `bridgeTxMeta`. Without this, the field
60+
+ // falls back to `bridgeTxMeta.id` (the orderUid), severing the link between
61+
+ // the bridge history record and the synthetic TransactionController entry.
62+
const historyKey = __classPrivateFieldGet(this, _BridgeStatusController_addTxToHistory, "f").call(this, {
63+
accountAddress,
64+
bridgeTxMeta: bridgeTxMetaForHistory,
65+
+ originalTransactionId: syntheticMeta.id, // Keep original txId for TransactionController updates
66+
quoteResponse,
67+
slippagePercentage: 0,
68+
isStxEnabled: false,

0 commit comments

Comments
 (0)