-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
deps: Replace eth-sig-util@^2 with @metamask/eth-sig-util@^6 #157
Changes from all commits
6ec437d
4c48fc3
cc1973c
860f7bd
6398b18
6923199
44fc2d5
4c032c5
b89f0be
f5c2c98
36d2ab4
88625cd
d10891f
f9457eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,22 @@ import { Common, Chain, Hardfork } from '@ethereumjs/common'; | |
import { RLP } from '@ethereumjs/rlp'; | ||
import { TransactionFactory } from '@ethereumjs/tx'; | ||
import * as ethUtil from '@ethereumjs/util'; | ||
import sigUtil from 'eth-sig-util'; | ||
import * as sigUtil from '@metamask/eth-sig-util'; | ||
import EthereumTx from 'ethereumjs-tx'; | ||
import HDKey from 'hdkey'; | ||
|
||
import { LedgerBridge } from './ledger-bridge'; | ||
import { LedgerIframeBridge } from './ledger-iframe-bridge'; | ||
import { AccountDetails, LedgerKeyring } from './ledger-keyring'; | ||
|
||
jest.mock('@metamask/eth-sig-util', () => { | ||
return { | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
__esModule: true, | ||
...jest.requireActual('@metamask/eth-sig-util'), | ||
}; | ||
}); | ||
|
||
Comment on lines
+13
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @legobeat is this necessary. Don't understand what, if anything, this is doing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is in order to mock the new version (see error this is addressing here:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this is a common approach when bundling all exports from an import into one variable and then spying on an individual export. Basically we're making a copy of |
||
const fakeAccounts = [ | ||
'0xF30952A1c534CDE7bC471380065726fa8686dfB3', | ||
'0x44fe3Cf56CaF651C4bD34Ae6dbcffa34e9e3b84B', | ||
|
@@ -700,7 +708,7 @@ describe('LedgerKeyring', function () { | |
}, | ||
], | ||
}, | ||
primaryType: 'Mail', | ||
primaryType: 'Mail' as const, | ||
types: { | ||
EIP712Domain: [ | ||
{ name: 'name', type: 'string' }, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these extra dependencies necessary? I don't see them being used in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're used by sibling modules: https://github.com/MetaMask/eth-ledger-bridge-keyring/actions/runs/6577714417/job/17869959528?pr=201