Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump @metamask/eth-ledger-bridge-keyring to ^5.0.1 #27688

Merged
merged 12 commits into from
Nov 12, 2024
15 changes: 15 additions & 0 deletions .yarn/patches/@ledgerhq-evm-tools-npm-1.2.3-414f44baa9.patch
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 .yarn/patches/@ledgerhq-hw-app-eth-npm-6.39.0-866309bbbe.patch
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; } });
182 changes: 170 additions & 12 deletions lavamoat/browserify/beta/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@
"@metamask/eth-ledger-bridge-keyring": {
"globals": {
"addEventListener": true,
"console.log": true,
"console.error": true,
"document.createElement": true,
"document.head.appendChild": true,
"fetch": true,
Expand All @@ -905,6 +905,7 @@
"@ethereumjs/tx": true,
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth": true,
"@metamask/eth-sig-util": true,
"@metamask/eth-trezor-keyring>hdkey": true,
"browserify>buffer": true,
Expand All @@ -916,6 +917,152 @@
"TextEncoder": true
}
},
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth": {
"globals": {
"console.warn": true
},
"packages": {
"@ethersproject/abi": true,
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/cryptoassets-evm-signatures": true,
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/domain-service": true,
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/errors": true,
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools": true,
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/logs": true,
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios": true,
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>bignumber.js": true,
"browserify>buffer": true,
"ethers>@ethersproject/rlp": true,
"semver": true
}
},
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/domain-service": {
"packages": {
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/domain-service>axios": true,
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/logs": true
}
},
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/domain-service>axios": {
"globals": {
"Blob": true,
"FormData": true,
"URLSearchParams": true,
"XMLHttpRequest": true,
"btoa": true,
"console.warn": true,
"document": true,
"location.href": true,
"navigator": true,
"setTimeout": true
},
"packages": {
"axios>form-data": true,
"browserify>buffer": true,
"process": true
}
},
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/errors": {
"globals": {
"console.warn": true
}
},
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools": {
"packages": {
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/cryptoassets-evm-signatures": true,
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>@ledgerhq/live-env": true,
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios": true,
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers": true,
"@metamask/ppom-validator>crypto-js": true
}
},
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>@ledgerhq/live-env": {
"globals": {
"console.warn": true
},
"packages": {
"wait-on>rxjs": true
}
},
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios": {
"globals": {
"Blob": true,
"FormData": true,
"URLSearchParams": true,
"XMLHttpRequest": true,
"btoa": true,
"console.warn": true,
"document": true,
"location.href": true,
"navigator": true,
"setTimeout": true
},
"packages": {
"axios>form-data": true,
"browserify>buffer": true,
"process": true
}
},
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers": {
"packages": {
"@ethersproject/abi": true,
"@ethersproject/bignumber": true,
"@ethersproject/bytes": true,
"@ethersproject/contracts": true,
"@ethersproject/hash": true,
"@ethersproject/hdnode": true,
"@ethersproject/providers": true,
"@ethersproject/providers>@ethersproject/web": true,
"@ethersproject/wallet": true,
"ethers>@ethersproject/abstract-signer": true,
"ethers>@ethersproject/address": true,
"ethers>@ethersproject/base64": true,
"ethers>@ethersproject/basex": true,
"ethers>@ethersproject/constants": true,
"ethers>@ethersproject/json-wallets": true,
"ethers>@ethersproject/keccak256": true,
"ethers>@ethersproject/logger": true,
"ethers>@ethersproject/properties": true,
"ethers>@ethersproject/random": true,
"ethers>@ethersproject/rlp": true,
"ethers>@ethersproject/sha2": true,
"ethers>@ethersproject/signing-key": true,
"ethers>@ethersproject/solidity": true,
"ethers>@ethersproject/strings": true,
"ethers>@ethersproject/transactions": true,
"ethers>@ethersproject/units": true,
"ethers>@ethersproject/wordlists": true
}
},
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/logs": {
"globals": {
"__ledgerLogsListen": "write",
"console.error": true
}
},
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>axios": {
"globals": {
"Blob": true,
"FormData": true,
"URLSearchParams": true,
"XMLHttpRequest": true,
"btoa": true,
"console.warn": true,
"document": true,
"location.href": true,
"navigator": true,
"setTimeout": true
},
"packages": {
"axios>form-data": true,
"browserify>buffer": true,
"process": true
}
},
"@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>bignumber.js": {
"globals": {
"crypto": true,
"define": true
}
},
"@metamask/eth-query": {
"packages": {
"@metamask/eth-query>json-rpc-random-id": true,
Expand Down Expand Up @@ -2521,9 +2668,9 @@
"@metamask/smart-transactions-controller>@ethereumjs/tx": {
"packages": {
"@ethereumjs/tx>ethereum-cryptography": true,
"@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
"@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/common": true,
"@metamask/smart-transactions-controller>@ethereumjs/util": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/rlp": true
"@metamask/smart-transactions-controller>@ethereumjs/util": true
}
},
"@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/common": {
Expand All @@ -2539,7 +2686,7 @@
},
"packages": {
"@ethereumjs/tx>ethereum-cryptography": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/rlp": true,
"@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
"webpack>events": true
}
},
Expand Down Expand Up @@ -3650,6 +3797,11 @@
"process": true
}
},
"axios>form-data": {
"globals": {
"FormData": true
}
},
"base32-encode": {
"packages": {
"base32-encode>to-data-view": true
Expand Down Expand Up @@ -4165,14 +4317,14 @@
"packages": {
"@ethereumjs/tx>@ethereumjs/common>crc-32": true,
"@ethersproject/abi": true,
"@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
"@metamask/eth-sig-util": true,
"@metamask/ethjs>js-sha3": true,
"@metamask/keyring-api>bech32": true,
"@metamask/ppom-validator>elliptic": true,
"bn.js": true,
"browserify>buffer": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/rlp": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx": true,
"eth-lattice-keyring>gridplus-sdk>aes-js": true,
"eth-lattice-keyring>gridplus-sdk>bignumber.js": true,
Expand All @@ -4190,15 +4342,10 @@
"webpack>events": true
}
},
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/rlp": {
"globals": {
"TextEncoder": true
}
},
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx": {
"packages": {
"@ethereumjs/tx>ethereum-cryptography": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/rlp": true,
"@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/util": true
}
Expand All @@ -4216,7 +4363,7 @@
},
"packages": {
"@ethereumjs/tx>ethereum-cryptography": true,
"eth-lattice-keyring>gridplus-sdk>@ethereumjs/rlp": true,
"@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true,
"webpack>events": true
}
},
Expand Down Expand Up @@ -5690,6 +5837,17 @@
"msCrypto": true
}
},
"wait-on>rxjs": {
"globals": {
"cancelAnimationFrame": true,
"clearInterval": true,
"clearTimeout": true,
"performance": true,
"requestAnimationFrame": true,
"setInterval.apply": true,
"setTimeout.apply": true
}
},
"web3": {
"globals": {
"XMLHttpRequest": true
Expand Down
Loading