Skip to content

Commit

Permalink
chore: bump eth-ledger-bridge-keyring to ^3.0.1 (#26498)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesposito authored Sep 9, 2024
1 parent b86f997 commit d6d43eb
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 68 deletions.

This file was deleted.

7 changes: 5 additions & 2 deletions app/scripts/lib/hardware-keyring-builder-factory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import type { TrezorBridge } from '@metamask/eth-trezor-keyring';
import type { LedgerBridge } from '@metamask/eth-ledger-bridge-keyring';
import type {
LedgerBridge,
LedgerBridgeOptions,
} from '@metamask/eth-ledger-bridge-keyring';
import { KeyringClass, Json } from '@metamask/utils';
import { FakeKeyringBridge } from '../../../test/stub/keyring-bridge';

Expand All @@ -8,7 +11,7 @@ import { FakeKeyringBridge } from '../../../test/stub/keyring-bridge';
*/
export type HardwareTransportBridgeClass =
| (new () => TrezorBridge)
| (new () => LedgerBridge)
| (new () => LedgerBridge<LedgerBridgeOptions>)
| (new () => FakeKeyringBridge);

/**
Expand Down
18 changes: 17 additions & 1 deletion app/scripts/lib/offscreen-bridge/ledger-offscreen-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import {
OffscreenCommunicationTarget,
} from '../../../../shared/constants/offscreen-communication';

/**
* The options for the LedgerOffscreenBridge are empty because the bridge
* doesn't require any options to be passed in.
*/
type LedgerOffscreenBridgeOptions = Record<never, never>;

/**
* This class is used as a custom bridge for the Ledger connection. Every
* hardware wallet keyring also requires a bridge that has a known interface
Expand All @@ -16,7 +22,9 @@ import {
* ledger device via the ledger keyring iframe. The ledger keyring iframe is
* added to the offscreen.html file directly.
*/
export class LedgerOffscreenBridge implements LedgerBridge {
export class LedgerOffscreenBridge
implements LedgerBridge<LedgerOffscreenBridgeOptions>
{
isDeviceConnected = false;

init() {
Expand All @@ -37,6 +45,14 @@ export class LedgerOffscreenBridge implements LedgerBridge {
return Promise.resolve();
}

getOptions() {
return Promise.resolve({});
}

setOptions() {
return Promise.resolve();
}

attemptMakeApp() {
return new Promise<boolean>((resolve, reject) => {
chrome.runtime.sendMessage(
Expand Down
2 changes: 1 addition & 1 deletion lavamoat/build-system/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -6700,7 +6700,7 @@
"tty.isatty": true
},
"globals": {
"process.argv": true,
"process.argv.includes": true,
"process.env": true,
"process.platform": true
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@
"@metamask/ens-controller": "^13.0.0",
"@metamask/eth-json-rpc-filters": "^7.0.0",
"@metamask/eth-json-rpc-middleware": "^14.0.1",
"@metamask/eth-ledger-bridge-keyring": "patch:@metamask/eth-ledger-bridge-keyring@npm%3A2.0.1#~/.yarn/patches/@metamask-eth-ledger-bridge-keyring-npm-2.0.1-7a5d815b2d.patch",
"@metamask/eth-ledger-bridge-keyring": "^3.0.1",
"@metamask/eth-query": "^4.0.0",
"@metamask/eth-sig-util": "^7.0.1",
"@metamask/eth-snap-keyring": "^4.3.1",
Expand Down
76 changes: 31 additions & 45 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ __metadata:
linkType: hard

"@babel/helper-annotate-as-pure@npm:^7.22.5":
version: 7.24.7
resolution: "@babel/helper-annotate-as-pure@npm:7.24.7"
version: 7.22.5
resolution: "@babel/helper-annotate-as-pure@npm:7.22.5"
dependencies:
"@babel/types": "npm:^7.24.7"
checksum: 10/a9017bfc1c4e9f2225b967fbf818004703de7cf29686468b54002ffe8d6b56e0808afa20d636819fcf3a34b89ba72f52c11bdf1d69f303928ee10d92752cad95
"@babel/types": "npm:^7.22.5"
checksum: 10/53da330f1835c46f26b7bf4da31f7a496dee9fd8696cca12366b94ba19d97421ce519a74a837f687749318f94d1a37f8d1abcbf35e8ed22c32d16373b2f6198d
languageName: node
linkType: hard

Expand Down Expand Up @@ -288,7 +288,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/helper-member-expression-to-functions@npm:^7.24.5, @babel/helper-member-expression-to-functions@npm:^7.24.7":
"@babel/helper-member-expression-to-functions@npm:^7.23.0, @babel/helper-member-expression-to-functions@npm:^7.24.5":
version: 7.24.8
resolution: "@babel/helper-member-expression-to-functions@npm:7.24.8"
dependencies:
Expand Down Expand Up @@ -322,7 +322,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/helper-optimise-call-expression@npm:^7.22.5, @babel/helper-optimise-call-expression@npm:^7.24.7":
"@babel/helper-optimise-call-expression@npm:^7.22.5":
version: 7.24.7
resolution: "@babel/helper-optimise-call-expression@npm:7.24.7"
dependencies:
Expand Down Expand Up @@ -352,15 +352,15 @@ __metadata:
linkType: hard

"@babel/helper-replace-supers@npm:^7.22.5, @babel/helper-replace-supers@npm:^7.22.9, @babel/helper-replace-supers@npm:^7.24.1":
version: 7.24.7
resolution: "@babel/helper-replace-supers@npm:7.24.7"
version: 7.24.1
resolution: "@babel/helper-replace-supers@npm:7.24.1"
dependencies:
"@babel/helper-environment-visitor": "npm:^7.24.7"
"@babel/helper-member-expression-to-functions": "npm:^7.24.7"
"@babel/helper-optimise-call-expression": "npm:^7.24.7"
"@babel/helper-environment-visitor": "npm:^7.22.20"
"@babel/helper-member-expression-to-functions": "npm:^7.23.0"
"@babel/helper-optimise-call-expression": "npm:^7.22.5"
peerDependencies:
"@babel/core": ^7.0.0
checksum: 10/18b7c3709819d008a14953e885748f3e197537f131d8f7ae095fec245506d854ff40b236edb1754afb6467f795aa90ae42a1d961a89557702249bacfc3fdad19
checksum: 10/1103b28ce0cc7fba903c21bc78035c696ff191bdbbe83c20c37030a2e10ae6254924556d942cdf8c44c48ba606a8266fdb105e6bb10945de9285f79cb1905df1
languageName: node
linkType: hard

Expand All @@ -374,12 +374,11 @@ __metadata:
linkType: hard

"@babel/helper-skip-transparent-expression-wrappers@npm:^7.22.5":
version: 7.24.7
resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.24.7"
version: 7.22.5
resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.22.5"
dependencies:
"@babel/traverse": "npm:^7.24.7"
"@babel/types": "npm:^7.24.7"
checksum: 10/784a6fdd251a9a7e42ccd04aca087ecdab83eddc60fda76a2950e00eb239cc937d3c914266f0cc476298b52ac3f44ffd04c358e808bd17552a7e008d75494a77
"@babel/types": "npm:^7.22.5"
checksum: 10/1012ef2295eb12dc073f2b9edf3425661e9b8432a3387e62a8bc27c42963f1f216ab3124228015c748770b2257b4f1fda882ca8fa34c0bf485e929ae5bc45244
languageName: node
linkType: hard

Expand Down Expand Up @@ -1651,7 +1650,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/traverse@npm:^7.12.5, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.23.2, @babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.24.8":
"@babel/traverse@npm:^7.12.5, @babel/traverse@npm:^7.18.9, @babel/traverse@npm:^7.23.2, @babel/traverse@npm:^7.24.8":
version: 7.24.8
resolution: "@babel/traverse@npm:7.24.8"
dependencies:
Expand Down Expand Up @@ -5198,29 +5197,16 @@ __metadata:
languageName: node
linkType: hard

"@metamask/eth-ledger-bridge-keyring@npm:2.0.1":
version: 2.0.1
resolution: "@metamask/eth-ledger-bridge-keyring@npm:2.0.1"
dependencies:
"@ethereumjs/rlp": "npm:^4.0.0"
"@ethereumjs/tx": "npm:^4.1.1"
"@ethereumjs/util": "npm:^8.0.0"
"@metamask/eth-sig-util": "npm:^7.0.0"
hdkey: "npm:^2.1.0"
checksum: 10/1320b6587e021a9c81697104f3accafcb3d3fc8d616a82bf8be6a4a945965dd0546a82b81fd3dbbcaab24b0eafe7d91bfbbe6081c70a78ba89035a87494fe4d8
languageName: node
linkType: hard

"@metamask/eth-ledger-bridge-keyring@patch:@metamask/eth-ledger-bridge-keyring@npm%3A2.0.1#~/.yarn/patches/@metamask-eth-ledger-bridge-keyring-npm-2.0.1-7a5d815b2d.patch":
version: 2.0.1
resolution: "@metamask/eth-ledger-bridge-keyring@patch:@metamask/eth-ledger-bridge-keyring@npm%3A2.0.1#~/.yarn/patches/@metamask-eth-ledger-bridge-keyring-npm-2.0.1-7a5d815b2d.patch::version=2.0.1&hash=322aa0"
"@metamask/eth-ledger-bridge-keyring@npm:^3.0.1":
version: 3.0.1
resolution: "@metamask/eth-ledger-bridge-keyring@npm:3.0.1"
dependencies:
"@ethereumjs/rlp": "npm:^4.0.0"
"@ethereumjs/tx": "npm:^4.1.1"
"@ethereumjs/util": "npm:^8.0.0"
"@metamask/eth-sig-util": "npm:^7.0.0"
hdkey: "npm:^2.1.0"
checksum: 10/0f8c86d1b4c323b8a79fa82e3df300034f8dea928569cc3560d1b3352e09e9397844b75b8642ca57866ef5e241b49bd190b8ba7d1b08efa248d9ca909485a674
checksum: 10/6643cca79fd6c1d2d65ff8affed1f8a776d1455025695396970605350b2cbfd14750c5fb1913d43552a61f9a369e0904a1accd46a9b8d771f7cd0196af6c1ae4
languageName: node
linkType: hard

Expand Down Expand Up @@ -14398,9 +14384,9 @@ __metadata:
linkType: hard

"caniuse-lite@npm:^1.0.30001109, caniuse-lite@npm:^1.0.30001587, caniuse-lite@npm:^1.0.30001599":
version: 1.0.30001643
resolution: "caniuse-lite@npm:1.0.30001643"
checksum: 10/dddbda29fa24fbc435873309c71070461cbfc915d9bce3216180524c20c5637b2bee1a14b45972e9ac19e1fdf63fba3f63608b9e7d68de32f5ee1953c8c69e05
version: 1.0.30001600
resolution: "caniuse-lite@npm:1.0.30001600"
checksum: 10/4c52f83ed71bc5f6e443bd17923460f1c77915adc2c2aa79ddaedceccc690b5917054b0c41b79e9138cbbd9abcdc0db9e224e79e3e734e581dfec06505f3a2b4
languageName: node
linkType: hard

Expand Down Expand Up @@ -17853,9 +17839,9 @@ __metadata:
linkType: hard

"escalade@npm:^3.1.1":
version: 3.1.2
resolution: "escalade@npm:3.1.2"
checksum: 10/a1e07fea2f15663c30e40b9193d658397846ffe28ce0a3e4da0d8e485fedfeca228ab846aee101a05015829adf39f9934ff45b2a3fca47bed37a29646bd05cd3
version: 3.1.1
resolution: "escalade@npm:3.1.1"
checksum: 10/afa618e73362576b63f6ca83c975456621095a1ed42ff068174e3f5cea48afc422814dda548c96e6ebb5333e7265140c7292abcc81bbd6ccb1757d50d3a4e182
languageName: node
linkType: hard

Expand Down Expand Up @@ -26117,7 +26103,7 @@ __metadata:
"@metamask/eslint-plugin-design-tokens": "npm:^1.1.0"
"@metamask/eth-json-rpc-filters": "npm:^7.0.0"
"@metamask/eth-json-rpc-middleware": "npm:^14.0.1"
"@metamask/eth-ledger-bridge-keyring": "patch:@metamask/eth-ledger-bridge-keyring@npm%3A2.0.1#~/.yarn/patches/@metamask-eth-ledger-bridge-keyring-npm-2.0.1-7a5d815b2d.patch"
"@metamask/eth-ledger-bridge-keyring": "npm:^3.0.1"
"@metamask/eth-query": "npm:^4.0.0"
"@metamask/eth-sig-util": "npm:^7.0.1"
"@metamask/eth-snap-keyring": "npm:^4.3.1"
Expand Down Expand Up @@ -29058,9 +29044,9 @@ __metadata:
linkType: hard

"picocolors@npm:^1.0.0":
version: 1.0.1
resolution: "picocolors@npm:1.0.1"
checksum: 10/fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5
version: 1.0.0
resolution: "picocolors@npm:1.0.0"
checksum: 10/a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981
languageName: node
linkType: hard

Expand Down

0 comments on commit d6d43eb

Please sign in to comment.