Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-tracing-to-hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
tommasini authored Nov 13, 2024
2 parents aaf4963 + 09fa44a commit 96f9027
Show file tree
Hide file tree
Showing 6 changed files with 217 additions and 130 deletions.
5 changes: 3 additions & 2 deletions app/core/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ import {
import SwapsController, { swapsUtils } from '@metamask/swaps-controller';
import {
PPOMController,
PPOMControllerActions,
PPOMControllerEvents,
PPOMState,
} from '@metamask/ppom-validator';
Expand Down Expand Up @@ -317,6 +318,7 @@ type GlobalActions =
| KeyringControllerActions
| AccountsControllerActions
| PreferencesControllerActions
| PPOMControllerActions
| TokensControllerActions
| TokenListControllerActions
| SelectedNetworkControllerActions
Expand Down Expand Up @@ -1674,11 +1676,10 @@ export class Engine {
).configuration.chainId,
blockaidPublicKey: process.env.BLOCKAID_PUBLIC_KEY as string,
cdnBaseUrl: process.env.BLOCKAID_FILE_CDN as string,
// @ts-expect-error TODO: Resolve/patch mismatch between base-controller versions. Before: never, never. Now: string, string, which expects 3rd and 4th args to be informed for restrictedControllerMessengers
messenger: this.controllerMessenger.getRestricted({
name: 'PPOMController',
allowedActions: ['NetworkController:getNetworkClientById'],
allowedEvents: [`${networkController.name}:stateChange`],
allowedEvents: [`${networkController.name}:networkDidChange`],
}),
onPreferencesChange: (listener) =>
this.controllerMessenger.subscribe(
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@
"@metamask/contract-metadata": "^2.1.0",
"@metamask/controller-utils": "^11.3.0",
"@metamask/design-tokens": "^4.0.0",
"@metamask/eth-ledger-bridge-keyring": "^6.0.0",
"@metamask/eth-json-rpc-filters": "^8.0.0",
"@metamask/eth-json-rpc-middleware": "^11.0.2",
"@metamask/eth-ledger-bridge-keyring": "^4.1.0",
"@metamask/eth-query": "^4.0.0",
"@metamask/eth-sig-util": "^7.0.2",
"@metamask/eth-snap-keyring": "^4.3.3",
Expand All @@ -168,7 +168,7 @@
"@metamask/permission-controller": "^11.0.0",
"@metamask/phishing-controller": "^12.0.3",
"@metamask/post-message-stream": "^8.0.0",
"@metamask/ppom-validator": "0.32.0",
"@metamask/ppom-validator": "0.35.1",
"@metamask/preferences-controller": "^13.1.0",
"@metamask/profile-sync-controller": "^0.9.7",
"@metamask/react-native-actionsheet": "2.4.2",
Expand Down
15 changes: 15 additions & 0 deletions patches/@ledgerhq+evm-tools+1.2.3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/node_modules/@ledgerhq/evm-tools/lib/message/EIP712/index.js b/node_modules/@ledgerhq/evm-tools/lib/message/EIP712/index.js
index 5443ac0..57ec861 100644
--- a/node_modules/@ledgerhq/evm-tools/lib/message/EIP712/index.js
+++ b/node_modules/@ledgerhq/evm-tools/lib/message/EIP712/index.js
@@ -28,8 +28,8 @@ const ethers_1 = require("ethers");
const axios_1 = __importDefault(require("axios"));
const sha224_1 = __importDefault(require("crypto-js/sha224"));
const live_env_1 = require("@ledgerhq/live-env");
-const eip712_1 = __importDefault(require("@ledgerhq/cryptoassets-evm-signatures/data/eip712"));
-const eip712_v2_1 = __importDefault(require("@ledgerhq/cryptoassets-evm-signatures/data/eip712_v2"));
+const eip712_1 = __importDefault(require("@ledgerhq/cryptoassets-evm-signatures/lib/data/eip712"));
+const eip712_v2_1 = __importDefault(require("@ledgerhq/cryptoassets-evm-signatures/lib/data/eip712_v2"));
// As defined in [spec](https://eips.ethereum.org/EIPS/eip-712), the properties below are all required.
function isEIP712Message(message) {
return (!!message &&
65 changes: 65 additions & 0 deletions patches/@ledgerhq+hw-app-eth+6.39.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
diff --git a/node_modules/@ledgerhq/hw-app-eth/lib/modules/EIP712/index.js b/node_modules/@ledgerhq/hw-app-eth/lib/modules/EIP712/index.js
index bbca23c..c85cb18 100644
--- a/node_modules/@ledgerhq/hw-app-eth/lib/modules/EIP712/index.js
+++ b/node_modules/@ledgerhq/hw-app-eth/lib/modules/EIP712/index.js
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.signEIP712HashedMessage = exports.signEIP712Message = void 0;
/* eslint-disable @typescript-eslint/no-duplicate-enum-values */
const semver_1 = __importDefault(require("semver"));
-const index_1 = require("@ledgerhq/evm-tools/message/EIP712/index");
+const index_1 = require("@ledgerhq/evm-tools/lib/message/EIP712/index");
const erc20_1 = require("../../services/ledger/erc20");
const utils_1 = require("../../utils");
const loadConfig_1 = require("../../services/ledger/loadConfig");
diff --git a/node_modules/@ledgerhq/hw-app-eth/lib/modules/EIP712/utils.js b/node_modules/@ledgerhq/hw-app-eth/lib/modules/EIP712/utils.js
index 4f09ea8..1cc7de0 100644
--- a/node_modules/@ledgerhq/hw-app-eth/lib/modules/EIP712/utils.js
+++ b/node_modules/@ledgerhq/hw-app-eth/lib/modules/EIP712/utils.js
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPayloadForFilterV2 = exports.getFilterDisplayNameAndSigBuffers = exports.getAppAndVersion = exports.getCoinRefTokensMap = exports.makeTypeEntryStructBuffer = exports.constructTypeDescByteString = exports.destructTypeFromString = exports.EIP712_TYPE_ENCODERS = exports.EIP712_TYPE_PROPERTIES = void 0;
const bignumber_js_1 = __importDefault(require("bignumber.js"));
-const index_1 = require("@ledgerhq/evm-tools/message/index");
+const index_1 = require("@ledgerhq/evm-tools/lib/message/index");
const utils_1 = require("../../utils");
/**
* @ignore for the README
diff --git a/node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/erc20.js b/node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/erc20.js
index 8fdedf8..c10cea2 100644
--- a/node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/erc20.js
+++ b/node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/erc20.js
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.byContractAddressAndChainId = exports.findERC20SignaturesInfo = void 0;
const axios_1 = __importDefault(require("axios"));
const logs_1 = require("@ledgerhq/logs");
-const index_1 = require("@ledgerhq/cryptoassets-evm-signatures/data/evm/index");
+const index_1 = require("@ledgerhq/cryptoassets-evm-signatures/lib/data/evm/index");
const loadConfig_1 = require("./loadConfig");
const asContractAddress = (addr) => {
const a = addr.toLowerCase();
diff --git a/node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/index.js b/node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/index.js
index 8385537..6641b95 100644
--- a/node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/index.js
+++ b/node_modules/@ledgerhq/hw-app-eth/lib/services/ledger/index.js
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
// This implements the resolution of a Transaction using Ledger's own API
const logs_1 = require("@ledgerhq/logs");
const abi_1 = require("@ethersproject/abi");
-const index_1 = require("@ledgerhq/domain-service/signers/index");
+const index_1 = require("@ledgerhq/domain-service/lib/signers/index");
const erc20_1 = require("./erc20");
const contracts_1 = require("./contracts");
const nfts_1 = require("./nfts");
diff --git a/node_modules/@ledgerhq/hw-app-eth/lib/utils.js b/node_modules/@ledgerhq/hw-app-eth/lib/utils.js
index 027089b..1c5da62 100644
--- a/node_modules/@ledgerhq/hw-app-eth/lib/utils.js
+++ b/node_modules/@ledgerhq/hw-app-eth/lib/utils.js
@@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.mergeResolutions = exports.nftSelectors = exports.tokenSelectors = exports.intAsHexBytes = exports.decodeTxInfo = exports.maybeHexBuffer = exports.hexBuffer = exports.splitPath = exports.padHexString = exports.ERC1155_CLEAR_SIGNED_SELECTORS = exports.ERC721_CLEAR_SIGNED_SELECTORS = exports.ERC20_CLEAR_SIGNED_SELECTORS = void 0;
const bignumber_js_1 = require("bignumber.js");
-const index_1 = require("@ledgerhq/evm-tools/selectors/index");
+const index_1 = require("@ledgerhq/evm-tools/lib/selectors/index");
Object.defineProperty(exports, "ERC20_CLEAR_SIGNED_SELECTORS", { enumerable: true, get: function () { return index_1.ERC20_CLEAR_SIGNED_SELECTORS; } });
Object.defineProperty(exports, "ERC721_CLEAR_SIGNED_SELECTORS", { enumerable: true, get: function () { return index_1.ERC721_CLEAR_SIGNED_SELECTORS; } });
Object.defineProperty(exports, "ERC1155_CLEAR_SIGNED_SELECTORS", { enumerable: true, get: function () { return index_1.ERC1155_CLEAR_SIGNED_SELECTORS; } });
69 changes: 0 additions & 69 deletions patches/@metamask+ppom-validator+0.32.0.patch

This file was deleted.

Loading

0 comments on commit 96f9027

Please sign in to comment.