-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28503 from MetaMask/Version-v12.8.0
chore: Version v12.8.0
- Loading branch information
Showing
506 changed files
with
23,260 additions
and
15,497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
.yarn/patches/@ledgerhq-evm-tools-npm-1.2.3-414f44baa9.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/lib/message/EIP712/index.js b/lib/message/EIP712/index.js | ||
index 5443ac06d4ef29028e3acce98210949da2ef9263..57ec8615340a9285290ad5d2c2522ed19af2d0fc 100644 | ||
--- a/lib/message/EIP712/index.js | ||
+++ b/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
65
.yarn/patches/@ledgerhq-hw-app-eth-npm-6.39.0-866309bbbe.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
diff --git a/lib/modules/EIP712/index.js b/lib/modules/EIP712/index.js | ||
index bbca23c9a596b2b300aca0f323bad277a4190def..c85cb18c3d6ff049c442d358b4d834c04a49951f 100644 | ||
--- a/lib/modules/EIP712/index.js | ||
+++ b/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/lib/modules/EIP712/utils.js b/lib/modules/EIP712/utils.js | ||
index 4f09ea8a24ae4f175f1a4d2d40999d36ffa2a915..1cc7de0d5ffd2b980741ad6d85a75792085c031b 100644 | ||
--- a/lib/modules/EIP712/utils.js | ||
+++ b/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/lib/services/ledger/erc20.js b/lib/services/ledger/erc20.js | ||
index 8fdedf8037b2684ab6d48fd279a0c014b074b676..c10cea22504a4d3cd72bfac51463e5664639d20e 100644 | ||
--- a/lib/services/ledger/erc20.js | ||
+++ b/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/lib/services/ledger/index.js b/lib/services/ledger/index.js | ||
index 8385537236dfc98902376b29f712e9f7b605091a..6641b951b0c7e477fe5622c724ee22b9e5272213 100644 | ||
--- a/lib/services/ledger/index.js | ||
+++ b/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/lib/utils.js b/lib/utils.js | ||
index 027089bf09c047b34af79e3dea253d5335d336f3..1c5da628db47a33099532973de9ea634a1ee65df 100644 | ||
--- a/lib/utils.js | ||
+++ b/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; } }); |
6 changes: 3 additions & 3 deletions
6
...s-controllers-npm-41.0.0-57b3d695bb.patch → ...s-controllers-npm-43.1.1-c223d56176.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
.yarn/patches/@metamask-assets-controllers-patch-9e00573eb4.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
diff --git a/dist/TokenDetectionController.cjs b/dist/TokenDetectionController.cjs | ||
index ab23c95d667357db365f925c4c4acce4736797f8..8fd5efde7a3c24080f8a43f79d10300e8c271245 100644 | ||
--- a/dist/TokenDetectionController.cjs | ||
+++ b/dist/TokenDetectionController.cjs | ||
@@ -204,13 +204,10 @@ class TokenDetectionController extends (0, polling_controller_1.StaticIntervalPo | ||
// Try detecting tokens via Account API first if conditions allow | ||
if (supportedNetworks && chainsToDetectUsingAccountAPI.length > 0) { | ||
const apiResult = await __classPrivateFieldGet(this, _TokenDetectionController_instances, "m", _TokenDetectionController_attemptAccountAPIDetection).call(this, chainsToDetectUsingAccountAPI, addressToDetect, supportedNetworks); | ||
- // If API succeeds and no chains are left for RPC detection, we can return early | ||
- if (apiResult?.result === 'success' && | ||
- chainsToDetectUsingRpc.length === 0) { | ||
- return; | ||
+ // If the account API call failed, have those chains fall back to RPC detection | ||
+ if (apiResult?.result === 'failed') { | ||
+ __classPrivateFieldGet(this, _TokenDetectionController_instances, "m", _TokenDetectionController_addChainsToRpcDetection).call(this, chainsToDetectUsingRpc, chainsToDetectUsingAccountAPI, clientNetworks); | ||
} | ||
- // If API fails or chainsToDetectUsingRpc still has items, add chains to RPC detection | ||
- __classPrivateFieldGet(this, _TokenDetectionController_instances, "m", _TokenDetectionController_addChainsToRpcDetection).call(this, chainsToDetectUsingRpc, chainsToDetectUsingAccountAPI, clientNetworks); | ||
} | ||
// Proceed with RPC detection if there are chains remaining in chainsToDetectUsingRpc | ||
if (chainsToDetectUsingRpc.length > 0) { | ||
@@ -446,8 +443,7 @@ async function _TokenDetectionController_addDetectedTokensViaAPI({ selectedAddre | ||
const tokenBalancesByChain = await __classPrivateFieldGet(this, _TokenDetectionController_accountsAPI, "f") | ||
.getMultiNetworksBalances(selectedAddress, chainIds, supportedNetworks) | ||
.catch(() => null); | ||
- if (!tokenBalancesByChain || | ||
- Object.keys(tokenBalancesByChain).length === 0) { | ||
+ if (tokenBalancesByChain === null) { | ||
return { result: 'failed' }; | ||
} | ||
// Process each chain ID individually | ||
diff --git a/dist/TokenDetectionController.mjs b/dist/TokenDetectionController.mjs | ||
index f75eb5c2c74f2a9d15a79760985111171dc938e1..ebc30bb915cc39dabf49f9e0da84a7948ae1ed48 100644 | ||
--- a/dist/TokenDetectionController.mjs | ||
+++ b/dist/TokenDetectionController.mjs | ||
@@ -205,13 +205,10 @@ export class TokenDetectionController extends StaticIntervalPollingController() | ||
// Try detecting tokens via Account API first if conditions allow | ||
if (supportedNetworks && chainsToDetectUsingAccountAPI.length > 0) { | ||
const apiResult = await __classPrivateFieldGet(this, _TokenDetectionController_instances, "m", _TokenDetectionController_attemptAccountAPIDetection).call(this, chainsToDetectUsingAccountAPI, addressToDetect, supportedNetworks); | ||
- // If API succeeds and no chains are left for RPC detection, we can return early | ||
- if (apiResult?.result === 'success' && | ||
- chainsToDetectUsingRpc.length === 0) { | ||
- return; | ||
+ // If the account API call failed, have those chains fall back to RPC detection | ||
+ if (apiResult?.result === 'failed') { | ||
+ __classPrivateFieldGet(this, _TokenDetectionController_instances, "m", _TokenDetectionController_addChainsToRpcDetection).call(this, chainsToDetectUsingRpc, chainsToDetectUsingAccountAPI, clientNetworks); | ||
} | ||
- // If API fails or chainsToDetectUsingRpc still has items, add chains to RPC detection | ||
- __classPrivateFieldGet(this, _TokenDetectionController_instances, "m", _TokenDetectionController_addChainsToRpcDetection).call(this, chainsToDetectUsingRpc, chainsToDetectUsingAccountAPI, clientNetworks); | ||
} | ||
// Proceed with RPC detection if there are chains remaining in chainsToDetectUsingRpc | ||
if (chainsToDetectUsingRpc.length > 0) { | ||
@@ -446,8 +443,7 @@ async function _TokenDetectionController_addDetectedTokensViaAPI({ selectedAddre | ||
const tokenBalancesByChain = await __classPrivateFieldGet(this, _TokenDetectionController_accountsAPI, "f") | ||
.getMultiNetworksBalances(selectedAddress, chainIds, supportedNetworks) | ||
.catch(() => null); | ||
- if (!tokenBalancesByChain || | ||
- Object.keys(tokenBalancesByChain).length === 0) { | ||
+ if (tokenBalancesByChain === null) { | ||
return { result: 'failed' }; | ||
} | ||
// Process each chain ID individually |
Oops, something went wrong.