Skip to content

Commit

Permalink
Merge branch 'main' into caip25-permission-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
jiexi committed Dec 19, 2024
2 parents 059ecad + 22490c3 commit cb4126d
Show file tree
Hide file tree
Showing 77 changed files with 1,480 additions and 542 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/wait-for-circleci-workflow-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ jobs:
OWNER: ${{ github.repository_owner }}
REPOSITORY: ${{ github.event.repository.name }}
BRANCH: ${{ github.head_ref || github.ref_name }}
# For a `push` event, the HEAD commit hash is `github.sha`.
# For a `pull_request` event, `github.sha` is instead the base branch commit hash. The
# HEAD commit hash is `pull_request.head.sha`.
HEAD_COMMIT_HASH: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
pipeline_id=$(curl --silent "https://circleci.com/api/v2/project/gh/$OWNER/$REPOSITORY/pipeline?branch=$BRANCH" | jq -r ".items[0].id")
pipeline_id=$(curl --silent "https://circleci.com/api/v2/project/gh/$OWNER/$REPOSITORY/pipeline?branch=$BRANCH" | jq -r ".items | map(select(.vcs.revision == \"${HEAD_COMMIT_HASH}\" )) | first | .id")
echo "Waiting for pipeline '${pipeline_id}' for commit hash '${HEAD_COMMIT_HASH}'"
workflow_status=$(curl --silent "https://circleci.com/api/v2/pipeline/$pipeline_id/workflow" | jq -r ".items[0].status")
if [ "$workflow_status" == "running" ]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
diff --git a/PATCH.txt b/PATCH.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ce3b18534f055ee00aa5821793f855fd300fb72c
index 0000000000000000000000000000000000000000..376255036ca54b83a3f3c3e0277c2666473df30e
--- /dev/null
+++ b/PATCH.txt
@@ -0,0 +1,4 @@
+We remove lookupNetwork from initializeProvider in the network controller to prevent network requests before user onboarding is completed.
+The network lookup is done after onboarding is completed, and when the extension reloads if onboarding has been completed.
+This patch is part of a temporary fix that will be reverted soon to make way for a more permanent solution. https://github.com/MetaMask/metamask-extension/pull/23005
+You can see the changes before compilation on this branch: https://github.com/MetaMask/core/compare/pnf/ext-23622-review?expand=1
\ No newline at end of file
diff --git a/dist/NetworkController.cjs b/dist/NetworkController.cjs
index cc9793f576eb39a51ab141b7d03de57cf99e5570..c573b5134d40f522217a6ab6df129040d02e9660 100644
index cc9793f576eb39a51ab141b7d03de57cf99e5570..184153067f2bbd58ea76d7db33c2af56245cd8c0 100644
--- a/dist/NetworkController.cjs
+++ b/dist/NetworkController.cjs
@@ -422,7 +422,6 @@ class NetworkController extends base_controller_1.BaseController {
Expand All @@ -22,7 +21,7 @@ index cc9793f576eb39a51ab141b7d03de57cf99e5570..c573b5134d40f522217a6ab6df129040
/**
* Refreshes the network meta with EIP-1559 support and the network status
diff --git a/dist/NetworkController.mjs b/dist/NetworkController.mjs
index 806f32edeffaad9f7eb1cafa4184368ec95f63e7..9268947cbed4bf717729ca6ac8ea83a8b91b6e8a 100644
index 806f32edeffaad9f7eb1cafa4184368ec95f63e7..7ba60e613ec8de7d273c32282be564f36873cbd2 100644
--- a/dist/NetworkController.mjs
+++ b/dist/NetworkController.mjs
@@ -397,7 +397,6 @@ export class NetworkController extends BaseController {
Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [12.9.2]
### Changed
- Display the "Amount" row within the advanced view of contract interaction confirmations, and whenever the amount being sent differs from the "You Send" row of the transaction simulation information by more than 5% ([#29131](https://github.com/MetaMask/metamask-extension/pull/29131))
- Improved phishing detection protections ([#28782](https://github.com/MetaMask/metamask-extension/pull/28782))

### Fixed
- Ensure that the correct fallback letter is used for network icons within the token list ([#29121](https://github.com/MetaMask/metamask-extension/pull/29121))
- Ensure users have to click through a blocking red warning before submitting multiple Smart Transactions while one is already pending ([#29140](https://github.com/MetaMask/metamask-extension/pull/29140))
- Prevent users from being stuck on an "Invalid string length" error screen, by deleting tokens from their state of the data was invalid because the `decimals` property of the token was `null` ([#29245](https://github.com/MetaMask/metamask-extension/pull/29245))

## [12.9.1]
### Changed
- The 'All Networks' view of assets on the home screen will now only get data across the 9 'popular networks' ([#29071](https://github.com/MetaMask/metamask-extension/pull/29071))
Expand Down Expand Up @@ -5477,7 +5487,8 @@ Update styles and spacing on the critical error page ([#20350](https://github.c
- Added the ability to restore accounts from seed words.


[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.9.1...HEAD
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v12.9.2...HEAD
[12.9.2]: https://github.com/MetaMask/metamask-extension/compare/v12.9.1...v12.9.2
[12.9.1]: https://github.com/MetaMask/metamask-extension/compare/v12.9.0...v12.9.1
[12.9.0]: https://github.com/MetaMask/metamask-extension/compare/v12.8.1...v12.9.0
[12.8.1]: https://github.com/MetaMask/metamask-extension/compare/v12.8.0...v12.8.1
Expand Down
24 changes: 21 additions & 3 deletions lavamoat/browserify/beta/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -2165,7 +2165,7 @@
"TextEncoder": true
},
"packages": {
"@noble/hashes": true
"@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true
}
},
"@noble/hashes": {
Expand All @@ -2180,6 +2180,24 @@
"crypto": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
Expand Down Expand Up @@ -2258,7 +2276,7 @@
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32": {
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
"@noble/hashes": true,
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true,
"@metamask/utils>@scure/base": true
}
},
Expand Down Expand Up @@ -3458,7 +3476,7 @@
},
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
"@noble/hashes": true,
"@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true,
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true
}
},
Expand Down
24 changes: 21 additions & 3 deletions lavamoat/browserify/flask/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -2165,7 +2165,7 @@
"TextEncoder": true
},
"packages": {
"@noble/hashes": true
"@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true
}
},
"@noble/hashes": {
Expand All @@ -2180,6 +2180,24 @@
"crypto": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
Expand Down Expand Up @@ -2258,7 +2276,7 @@
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32": {
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
"@noble/hashes": true,
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true,
"@metamask/utils>@scure/base": true
}
},
Expand Down Expand Up @@ -3458,7 +3476,7 @@
},
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
"@noble/hashes": true,
"@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true,
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true
}
},
Expand Down
24 changes: 21 additions & 3 deletions lavamoat/browserify/main/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -2165,7 +2165,7 @@
"TextEncoder": true
},
"packages": {
"@noble/hashes": true
"@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true
}
},
"@noble/hashes": {
Expand All @@ -2180,6 +2180,24 @@
"crypto": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
Expand Down Expand Up @@ -2258,7 +2276,7 @@
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32": {
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
"@noble/hashes": true,
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true,
"@metamask/utils>@scure/base": true
}
},
Expand Down Expand Up @@ -3458,7 +3476,7 @@
},
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
"@noble/hashes": true,
"@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true,
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true
}
},
Expand Down
24 changes: 21 additions & 3 deletions lavamoat/browserify/mmi/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -2257,7 +2257,7 @@
"TextEncoder": true
},
"packages": {
"@noble/hashes": true
"@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true
}
},
"@noble/hashes": {
Expand All @@ -2272,6 +2272,24 @@
"crypto": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
Expand Down Expand Up @@ -2350,7 +2368,7 @@
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32": {
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
"@noble/hashes": true,
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true,
"@metamask/utils>@scure/base": true
}
},
Expand Down Expand Up @@ -3550,7 +3568,7 @@
},
"packages": {
"@ethereumjs/tx>ethereum-cryptography>@noble/curves": true,
"@noble/hashes": true,
"@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true,
"@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true
}
},
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "metamask-crx",
"version": "12.9.1",
"version": "12.9.2",
"private": true,
"repository": {
"type": "git",
Expand Down Expand Up @@ -242,7 +242,7 @@
"@json-schema-tools/reference-resolver@npm:1.2.4": "patch:@json-schema-tools/reference-resolver@npm%3A1.2.6#~/.yarn/patches/@json-schema-tools-reference-resolver-npm-1.2.6-4e1497c16d.patch",
"@json-schema-tools/reference-resolver@npm:^1.2.4": "patch:@json-schema-tools/reference-resolver@npm%3A1.2.6#~/.yarn/patches/@json-schema-tools-reference-resolver-npm-1.2.6-4e1497c16d.patch",
"@json-schema-tools/reference-resolver@npm:^1.2.1": "patch:@json-schema-tools/reference-resolver@npm%3A1.2.6#~/.yarn/patches/@json-schema-tools-reference-resolver-npm-1.2.6-4e1497c16d.patch",
"@metamask/network-controller@npm:^22.0.0": "patch:@metamask/network-controller@npm%3A22.1.0#~/.yarn/patches/@metamask-network-controller-npm-22.1.0-621c281f70.patch",
"@metamask/network-controller@npm:^22.0.2": "patch:@metamask/network-controller@npm%3A22.1.1#~/.yarn/patches/@metamask-network-controller-npm-22.1.1-09b6510f1e.patch",
"path-to-regexp": "1.9.0",
"@ledgerhq/cryptoassets-evm-signatures/axios": "^0.28.0",
"@ledgerhq/domain-service/axios": "^0.28.0",
Expand Down Expand Up @@ -301,7 +301,7 @@
"@metamask/ens-controller": "^15.0.0",
"@metamask/ens-resolver-snap": "^0.1.2",
"@metamask/eth-json-rpc-filters": "^9.0.0",
"@metamask/eth-json-rpc-middleware": "^15.0.0",
"@metamask/eth-json-rpc-middleware": "^15.0.1",
"@metamask/eth-ledger-bridge-keyring": "^5.0.1",
"@metamask/eth-query": "^4.0.0",
"@metamask/eth-sig-util": "^7.0.1",
Expand All @@ -327,7 +327,7 @@
"@metamask/metamask-eth-abis": "^3.1.1",
"@metamask/multichain": "^2.0.0",
"@metamask/name-controller": "^8.0.0",
"@metamask/network-controller": "patch:@metamask/network-controller@npm%3A22.1.0#~/.yarn/patches/@metamask-network-controller-npm-22.1.0-621c281f70.patch",
"@metamask/network-controller": "patch:@metamask/network-controller@npm%3A22.1.1#~/.yarn/patches/@metamask-network-controller-npm-22.1.1-09b6510f1e.patch",
"@metamask/notification-services-controller": "^0.15.0",
"@metamask/object-multiplex": "^2.0.0",
"@metamask/obs-store": "^9.0.0",
Expand All @@ -348,15 +348,15 @@
"@metamask/scure-bip39": "^2.0.3",
"@metamask/selected-network-controller": "^19.0.0",
"@metamask/signature-controller": "^23.1.0",
"@metamask/smart-transactions-controller": "^15.0.0",
"@metamask/smart-transactions-controller": "^16.0.0",
"@metamask/snaps-controllers": "^9.15.0",
"@metamask/snaps-execution-environments": "^6.10.0",
"@metamask/snaps-rpc-methods": "^11.7.0",
"@metamask/snaps-sdk": "^6.13.0",
"@metamask/snaps-utils": "^8.6.1",
"@metamask/solana-wallet-snap": "^1.0.3",
"@metamask/solana-wallet-snap": "^1.0.4",
"@metamask/transaction-controller": "^42.0.0",
"@metamask/user-operation-controller": "^19.0.0",
"@metamask/user-operation-controller": "^21.0.0",
"@metamask/utils": "^10.0.1",
"@ngraveio/bc-ur": "^1.1.12",
"@noble/hashes": "^1.3.3",
Expand Down
2 changes: 2 additions & 0 deletions privacy-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"accounts.api.cx.metamask.io",
"acl.execution.metamask.io",
"api.blockchair.com",
"api.devnet.solana.com",
"api.lens.dev",
"api.segment.io",
"api.web3modal.com",
Expand Down Expand Up @@ -59,6 +60,7 @@
"sepolia.infura.io",
"signature-insights.api.cx.metamask.io",
"snaps.metamask.io",
"solana.rpc.grove.city",
"sourcify.dev",
"start.metamask.io",
"static.cx.metamask.io",
Expand Down
4 changes: 4 additions & 0 deletions shared/constants/metametrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,9 @@ export enum MetaMetricsEventName {
AppUnlockedFailed = 'App Unlocked Failed',
AppLocked = 'App Locked',
AppWindowExpanded = 'App Window Expanded',
BannerDisplay = 'Banner Display',
BannerCloseAll = 'Banner Close All',
BannerSelect = 'Banner Select',
BridgeLinkClicked = 'Bridge Link Clicked',
BitcoinSupportToggled = 'Bitcoin Support Toggled',
BitcoinTestnetSupportToggled = 'Bitcoin Testnet Support Toggled',
Expand Down Expand Up @@ -912,6 +915,7 @@ export enum MetaMetricsEventCategory {
App = 'App',
Auth = 'Auth',
Background = 'Background',
Banner = 'Banner',
// The TypeScript ESLint rule is incorrectly marking this line.
/* eslint-disable-next-line @typescript-eslint/no-shadow */
Error = 'Error',
Expand Down
1 change: 1 addition & 0 deletions test/data/mock-state.json
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,7 @@
"watchEthereumAccountEnabled": false,
"bitcoinSupportEnabled": false,
"bitcoinTestnetSupportEnabled": false,
"solanaSupportEnabled": false,
"pendingApprovals": {
"testApprovalId": {
"id": "testApprovalId",
Expand Down
3 changes: 3 additions & 0 deletions test/e2e/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ export const DEFAULT_BTC_FEES_RATE = 0.00001; // BTC
/* Default BTC conversion rate to USD */
export const DEFAULT_BTC_CONVERSION_RATE = 62000; // USD

/* Default SOL conversion rate to USD */
export const DEFAULT_SOL_CONVERSION_RATE = 226; // USD

/* Default BTC transaction ID */
export const DEFAULT_BTC_TRANSACTION_ID =
'e4111a707317da67d49a71af4cbcf6c0546f900ca32c3842d2254e315d1fca18';
Expand Down
Loading

0 comments on commit cb4126d

Please sign in to comment.