mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 09:23:21 +01:00
Enable legacy HD paths for trezor users (#19552)
* Update eth-trezor-keyring to v1.1.0
* Revert "Revert "feature: Add legacy derivation path to Trezor (#19443)" (#19451)"
This reverts commit b5ef94b9f0
.
* Fix trezor import
* Update lavamoat policies
* Remove accidentally committed code
* Fix type in previous commit
This commit is contained in:
parent
787fc13f19
commit
b8525566f2
@ -18,7 +18,7 @@ import createSubscriptionManager from 'eth-json-rpc-filters/subscriptionManager'
|
||||
import { errorCodes as rpcErrorCodes, EthereumRpcError } from 'eth-rpc-errors';
|
||||
import { Mutex } from 'await-semaphore';
|
||||
import log from 'loglevel';
|
||||
import TrezorKeyring from '@metamask/eth-trezor-keyring';
|
||||
import { TrezorKeyring } from '@metamask/eth-trezor-keyring';
|
||||
import LedgerBridgeKeyring from '@metamask/eth-ledger-bridge-keyring';
|
||||
import LatticeKeyring from 'eth-lattice-keyring';
|
||||
import { MetaMaskKeyring as QRHardwareKeyring } from '@keystonehq/metamask-airgapped-keyring';
|
||||
|
@ -31,7 +31,7 @@ function upload_sourcemaps {
|
||||
local release="${1}"; shift
|
||||
local dist_directory="${1}"; shift
|
||||
|
||||
sentry-cli releases files "${release}" upload-sourcemaps "${dist_directory}"/chrome/*.js "${dist_directory}"/sourcemaps/ --rewrite --url-prefix '/metamask'
|
||||
sentry-cli releases files "${release}" upload-sourcemaps "${dist_directory}"/chrome/*.js "${dist_directory}"/sourcemaps/ --rewrite --url-prefix 'metamask'
|
||||
}
|
||||
|
||||
function main {
|
||||
|
@ -1276,6 +1276,7 @@
|
||||
"packages": {
|
||||
"@ethereumjs/tx": true,
|
||||
"@ethereumjs/tx>@ethereumjs/util": true,
|
||||
"@metamask/eth-trezor-keyring>@metamask/utils": true,
|
||||
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": true,
|
||||
"@metamask/eth-trezor-keyring>@trezor/connect-web": true,
|
||||
"@metamask/eth-trezor-keyring>hdkey": true,
|
||||
@ -1283,6 +1284,18 @@
|
||||
"browserify>events": true
|
||||
}
|
||||
},
|
||||
"@metamask/eth-trezor-keyring>@metamask/utils": {
|
||||
"globals": {
|
||||
"TextDecoder": true,
|
||||
"TextEncoder": true
|
||||
},
|
||||
"packages": {
|
||||
"browserify>buffer": true,
|
||||
"nock>debug": true,
|
||||
"semver": true,
|
||||
"superstruct": true
|
||||
}
|
||||
},
|
||||
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": {
|
||||
"packages": {
|
||||
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": true
|
||||
|
@ -1404,6 +1404,7 @@
|
||||
"packages": {
|
||||
"@ethereumjs/tx": true,
|
||||
"@ethereumjs/tx>@ethereumjs/util": true,
|
||||
"@metamask/eth-trezor-keyring>@metamask/utils": true,
|
||||
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": true,
|
||||
"@metamask/eth-trezor-keyring>@trezor/connect-web": true,
|
||||
"@metamask/eth-trezor-keyring>hdkey": true,
|
||||
@ -1411,6 +1412,18 @@
|
||||
"browserify>events": true
|
||||
}
|
||||
},
|
||||
"@metamask/eth-trezor-keyring>@metamask/utils": {
|
||||
"globals": {
|
||||
"TextDecoder": true,
|
||||
"TextEncoder": true
|
||||
},
|
||||
"packages": {
|
||||
"browserify>buffer": true,
|
||||
"nock>debug": true,
|
||||
"semver": true,
|
||||
"superstruct": true
|
||||
}
|
||||
},
|
||||
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": {
|
||||
"packages": {
|
||||
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": true
|
||||
|
@ -1404,6 +1404,7 @@
|
||||
"packages": {
|
||||
"@ethereumjs/tx": true,
|
||||
"@ethereumjs/tx>@ethereumjs/util": true,
|
||||
"@metamask/eth-trezor-keyring>@metamask/utils": true,
|
||||
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": true,
|
||||
"@metamask/eth-trezor-keyring>@trezor/connect-web": true,
|
||||
"@metamask/eth-trezor-keyring>hdkey": true,
|
||||
@ -1411,6 +1412,18 @@
|
||||
"browserify>events": true
|
||||
}
|
||||
},
|
||||
"@metamask/eth-trezor-keyring>@metamask/utils": {
|
||||
"globals": {
|
||||
"TextDecoder": true,
|
||||
"TextEncoder": true
|
||||
},
|
||||
"packages": {
|
||||
"browserify>buffer": true,
|
||||
"nock>debug": true,
|
||||
"semver": true,
|
||||
"superstruct": true
|
||||
}
|
||||
},
|
||||
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": {
|
||||
"packages": {
|
||||
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": true
|
||||
|
@ -1276,6 +1276,7 @@
|
||||
"packages": {
|
||||
"@ethereumjs/tx": true,
|
||||
"@ethereumjs/tx>@ethereumjs/util": true,
|
||||
"@metamask/eth-trezor-keyring>@metamask/utils": true,
|
||||
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": true,
|
||||
"@metamask/eth-trezor-keyring>@trezor/connect-web": true,
|
||||
"@metamask/eth-trezor-keyring>hdkey": true,
|
||||
@ -1283,6 +1284,18 @@
|
||||
"browserify>events": true
|
||||
}
|
||||
},
|
||||
"@metamask/eth-trezor-keyring>@metamask/utils": {
|
||||
"globals": {
|
||||
"TextDecoder": true,
|
||||
"TextEncoder": true
|
||||
},
|
||||
"packages": {
|
||||
"browserify>buffer": true,
|
||||
"nock>debug": true,
|
||||
"semver": true,
|
||||
"superstruct": true
|
||||
}
|
||||
},
|
||||
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": {
|
||||
"packages": {
|
||||
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": true
|
||||
|
@ -1417,6 +1417,7 @@
|
||||
"packages": {
|
||||
"@ethereumjs/tx": true,
|
||||
"@ethereumjs/tx>@ethereumjs/util": true,
|
||||
"@metamask/eth-trezor-keyring>@metamask/utils": true,
|
||||
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": true,
|
||||
"@metamask/eth-trezor-keyring>@trezor/connect-web": true,
|
||||
"@metamask/eth-trezor-keyring>hdkey": true,
|
||||
@ -1424,6 +1425,18 @@
|
||||
"browserify>events": true
|
||||
}
|
||||
},
|
||||
"@metamask/eth-trezor-keyring>@metamask/utils": {
|
||||
"globals": {
|
||||
"TextDecoder": true,
|
||||
"TextEncoder": true
|
||||
},
|
||||
"packages": {
|
||||
"browserify>buffer": true,
|
||||
"nock>debug": true,
|
||||
"semver": true,
|
||||
"superstruct": true
|
||||
}
|
||||
},
|
||||
"@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": {
|
||||
"packages": {
|
||||
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": true
|
||||
|
@ -244,7 +244,7 @@
|
||||
"@metamask/eth-ledger-bridge-keyring": "^0.15.0",
|
||||
"@metamask/eth-snap-keyring": "^0.1.3",
|
||||
"@metamask/eth-token-tracker": "^4.0.0",
|
||||
"@metamask/eth-trezor-keyring": "^1.0.0",
|
||||
"@metamask/eth-trezor-keyring": "^1.1.0",
|
||||
"@metamask/etherscan-link": "^2.2.0",
|
||||
"@metamask/gas-fee-controller": "^6.0.1",
|
||||
"@metamask/jazzicon": "^2.0.0",
|
||||
|
@ -60,6 +60,7 @@ export const LATTICE_HD_PATHS = [
|
||||
const TREZOR_TESTNET_PATH = `m/44'/1'/0'/0`;
|
||||
export const TREZOR_HD_PATHS = [
|
||||
{ name: `BIP44 Standard (e.g. MetaMask, Trezor)`, value: BIP44_PATH },
|
||||
{ name: `Legacy (Ledger / MEW / MyCrypto)`, value: MEW_PATH },
|
||||
{ name: `Trezor Testnets`, value: TREZOR_TESTNET_PATH },
|
||||
];
|
||||
|
||||
|
11
yarn.lock
11
yarn.lock
@ -4182,17 +4182,18 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@metamask/eth-trezor-keyring@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "@metamask/eth-trezor-keyring@npm:1.0.0"
|
||||
"@metamask/eth-trezor-keyring@npm:^1.1.0":
|
||||
version: 1.1.0
|
||||
resolution: "@metamask/eth-trezor-keyring@npm:1.1.0"
|
||||
dependencies:
|
||||
"@ethereumjs/tx": "npm:^4.0.0"
|
||||
"@ethereumjs/util": "npm:^8.0.0"
|
||||
"@metamask/eth-sig-util": "npm:^5.0.2"
|
||||
"@metamask/utils": "npm:^4.0.0"
|
||||
"@trezor/connect-plugin-ethereum": "npm:^9.0.1"
|
||||
"@trezor/connect-web": "npm:^9.0.6"
|
||||
hdkey: "npm:0.8.0"
|
||||
checksum: 421da0ffef37f92d0b16d360acf00317bce32bf1a5471d98cf30b7536df38f111cb894006210997c8c1aa6da2e1b291e22571451cd771a8d2f084da111a2d038
|
||||
checksum: eb1ac827d07a6c2d7b0f1f291691b13b1b65db85f4bced5e2af9f5bdf9117a9b725673b069ad67fd57b7c525cbb53755f8b3877a1f2c72e7812b2d8e127a52a9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -24214,7 +24215,7 @@ __metadata:
|
||||
"@metamask/eth-ledger-bridge-keyring": "npm:^0.15.0"
|
||||
"@metamask/eth-snap-keyring": "npm:^0.1.3"
|
||||
"@metamask/eth-token-tracker": "npm:^4.0.0"
|
||||
"@metamask/eth-trezor-keyring": "npm:^1.0.0"
|
||||
"@metamask/eth-trezor-keyring": "npm:^1.1.0"
|
||||
"@metamask/etherscan-link": "npm:^2.2.0"
|
||||
"@metamask/forwarder": "npm:^1.1.0"
|
||||
"@metamask/gas-fee-controller": "npm:^6.0.1"
|
||||
|
Loading…
Reference in New Issue
Block a user