diff --git a/packages/wallet-sdk/src/sign/walletlink/WalletLinkSigner.test.ts b/packages/wallet-sdk/src/sign/walletlink/WalletLinkSigner.test.ts index 1df3ef3aaa..3bd9452cba 100644 --- a/packages/wallet-sdk/src/sign/walletlink/WalletLinkSigner.test.ts +++ b/packages/wallet-sdk/src/sign/walletlink/WalletLinkSigner.test.ts @@ -208,7 +208,7 @@ describe('LegacyProvider', () => { const sendRequestSpy = jest.spyOn(relay, 'sendRequest'); const provider = createAdapter({ relay }); - const ENCODED_MESSAGE = '0xb7845733ba102a68c6eb21c3cd2feafafd1130de581d7e73be60b76d775b6704'; + const ENCODED_MESSAGE = '0x421b6e328c574f0ee83a68d51d01be3597d8b5391c7725dfa80247a60b5cd390'; const ENCODED_TYPED_DATA_JSON = JSON.stringify(MOCK_TYPED_DATA); beforeEach(() => { diff --git a/packages/wallet-sdk/src/vendor-js/eth-eip712-util/index.js b/packages/wallet-sdk/src/vendor-js/eth-eip712-util/index.js index 7b3cc4c3f2..d0a56b44d2 100644 --- a/packages/wallet-sdk/src/vendor-js/eth-eip712-util/index.js +++ b/packages/wallet-sdk/src/vendor-js/eth-eip712-util/index.js @@ -1,3 +1,6 @@ +/* eslint-disable */ +//prettier-ignore + const util = require('./util') const abi = require('./abi') diff --git a/packages/wallet-sdk/src/vendor-js/eth-eip712-util/util.js b/packages/wallet-sdk/src/vendor-js/eth-eip712-util/util.js index 7d24b0f80a..47755cb8d1 100644 --- a/packages/wallet-sdk/src/vendor-js/eth-eip712-util/util.js +++ b/packages/wallet-sdk/src/vendor-js/eth-eip712-util/util.js @@ -138,8 +138,10 @@ function bufferToHex (buf) { function keccak (a, bits) { a = toBuffer(a) if (!bits) bits = 256 - - return Buffer.from(keccak_256('keccak' + bits)) + if (bits !== 256) { + throw new Error('unsupported') + } + return Buffer.from(keccak_256(new Uint8Array(a))) } function padToEven (str) {