Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/migrate-circleci
Browse files Browse the repository at this point in the history
* origin/main: (92 commits)
  fix: hide first interaction alert if token transfer recipient is internal account (#29389)
  ci: Migrate LavaMoat validation to GitHub Actions (#29369)
  ci: Migrate lint CI steps (#29371)
  ci: Migrate dependency linting (#29370)
  chore: Update to the latest transaction controller (#29395)
  fix: Add main frame URL property to req object whenever req is triggered from an iframe (#29337)
  feat(14507): improve error message for failed txn in activity details view (#29338)
  fix(28081): design tweak for network badge (#29324)
  chore: Bump Snaps packages (#29275)
  fix: Use margin instead of padding for the Snaps UI Container (#29385)
  fix(29226): fix error for undefined unitInput for sending NFT (#29386)
  fix: navigation between watch asset approvals (#29279)
  fix: remove reliance on transaction decode in confirmations (#29341)
  fix: Adding validation for primary type of types sign signatures (#29379)
  fix: remove Text in the Activity Empty State (#29318)
  fix: `gasFeeEstimates` property undefined (#29312)
  fix: fixed truncation issue for long help text (#29269)
  test: remove duplicate signature tests (#29377)
  test: [POM] Migrate watch account tests (#29314)
  fix: UI is not displaying gas limit set by dapp (#29352)
  ...
  • Loading branch information
Gudahtt committed Dec 20, 2024
2 parents 1abbf88 + f64a2d0 commit a015011
Show file tree
Hide file tree
Showing 506 changed files with 30,854 additions and 26,944 deletions.
41 changes: 40 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,46 @@ jobs:
name: Test storybook
uses: ./.github/workflows/test-storybook.yml

test-lint-shellcheck:
name: Test lint shellcheck
uses: ./.github/workflows/test-lint-shellcheck.yml

test-lint:
name: Test lint
uses: ./.github/workflows/test-lint.yml

test-lint-changelog:
name: Test lint changelog
uses: ./.github/workflows/test-lint-changelog.yml

test-lint-lockfile:
name: Test lint lockfile
uses: ./.github/workflows/test-lint-lockfile.yml

test-deps-audit:
name: Test deps audit
uses: ./.github/workflows/test-deps-audit.yml

test-yarn-dedupe:
name: Test yarn dedupe
uses: ./.github/workflows/test-yarn-dedupe.yml

test-deps-depcheck:
name: Test deps depcheck
uses: ./.github/workflows/test-deps-depcheck.yml

validate-lavamoat-allow-scripts:
name: Validate lavamoat allow scripts
uses: ./.github/workflows/validate-lavamoat-allow-scripts.yml

validate-lavamoat-policy-build:
name: Validate lavamoat policy build
uses: ./.github/workflows/validate-lavamoat-policy-build.yml

validate-lavamoat-policy-webapp:
name: Validate lavamoat policy webapp
uses: ./.github/workflows/validate-lavamoat-policy-webapp.yml

run-tests:
name: Run tests
uses: ./.github/workflows/run-tests.yml
Expand Down Expand Up @@ -99,7 +139,6 @@ jobs:
runs-on: ubuntu-latest
needs:
- lint-workflows
- test-deps-audit
- test-yarn-dedupe
- test-lint-shellcheck
- test-deps-depcheck
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/validate-lavamoat-policy-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:

- name: Validate lavamoat build policy
run: yarn lavamoat:build:auto
env:
INFURA_PROJECT_ID: 00000000000

- name: Check working tree
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/validate-lavamoat-policy-webapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:

- name: Validate lavamoat ${{ matrix.build-type }} policy
run: yarn lavamoat:webapp:auto:ci --build-types=${{ matrix.build-type }}
env:
INFURA_PROJECT_ID: 00000000000

- name: Check working tree
run: |
Expand Down
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
61 changes: 61 additions & 0 deletions .yarn/patches/@metamask-assets-controllers-patch-d6ed5f8213.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
diff --git a/dist/multicall.cjs b/dist/multicall.cjs
index bf9aa5e86573fc1651f421cc0b64f5af121c3ab2..43a0531ed86cd3ee1774dcda3f990dd40f7f52de 100644
--- a/dist/multicall.cjs
+++ b/dist/multicall.cjs
@@ -342,9 +342,22 @@ const multicallOrFallback = async (calls, chainId, provider, maxCallsPerMultical
return [];
}
const multicallAddress = MULTICALL_CONTRACT_BY_CHAINID[chainId];
- return await (multicallAddress
- ? multicall(calls, multicallAddress, provider, maxCallsPerMulticall)
- : fallback(calls, maxCallsParallel));
+ if (multicallAddress) {
+ try {
+ return await multicall(calls, multicallAddress, provider, maxCallsPerMulticall);
+ }
+ catch (error) {
+ // Fallback only on revert
+ // https://docs.ethers.org/v5/troubleshooting/errors/#help-CALL_EXCEPTION
+ if (!error ||
+ typeof error !== 'object' ||
+ !('code' in error) ||
+ error.code !== 'CALL_EXCEPTION') {
+ throw error;
+ }
+ }
+ }
+ return await fallback(calls, maxCallsParallel);
};
exports.multicallOrFallback = multicallOrFallback;
//# sourceMappingURL=multicall.cjs.map
\ No newline at end of file
diff --git a/dist/multicall.mjs b/dist/multicall.mjs
index 8fbe0112303d5df1d868e0357a9d31e43a3b6cf9..860dfdbddd813659cb2be5f7faed5d4016db5966 100644
--- a/dist/multicall.mjs
+++ b/dist/multicall.mjs
@@ -339,8 +339,21 @@ export const multicallOrFallback = async (calls, chainId, provider, maxCallsPerM
return [];
}
const multicallAddress = MULTICALL_CONTRACT_BY_CHAINID[chainId];
- return await (multicallAddress
- ? multicall(calls, multicallAddress, provider, maxCallsPerMulticall)
- : fallback(calls, maxCallsParallel));
+ if (multicallAddress) {
+ try {
+ return await multicall(calls, multicallAddress, provider, maxCallsPerMulticall);
+ }
+ catch (error) {
+ // Fallback only on revert
+ // https://docs.ethers.org/v5/troubleshooting/errors/#help-CALL_EXCEPTION
+ if (!error ||
+ typeof error !== 'object' ||
+ !('code' in error) ||
+ error.code !== 'CALL_EXCEPTION') {
+ throw error;
+ }
+ }
+ }
+ return await fallback(calls, maxCallsParallel);
};
//# sourceMappingURL=multicall.mjs.map
\ No newline at end of file
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
6 changes: 0 additions & 6 deletions app/_locales/am/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/ar/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/bg/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/bn/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/ca/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/cs/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions app/_locales/da/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a015011

Please sign in to comment.