From 952131d3a314cdd754c6ec4a935596b075fab247 Mon Sep 17 00:00:00 2001 From: netbonus <151201453+netbonus@users.noreply.github.com> Date: Fri, 7 Jun 2024 16:16:53 -0400 Subject: [PATCH] fix vertex/blur tests --- src/__test__/e2e/eth.msg.test.ts | 2 +- src/ethereum.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/__test__/e2e/eth.msg.test.ts b/src/__test__/e2e/eth.msg.test.ts index f02be5fe..f85dea77 100644 --- a/src/__test__/e2e/eth.msg.test.ts +++ b/src/__test__/e2e/eth.msg.test.ts @@ -284,7 +284,7 @@ describe('ETH Messages', () => { ], Order: [ { name: 'sender', type: 'bytes32' }, - { name: 'priceX18', type: 'int128' }, + { name: 'priceX18', type: 'uint256' }, { name: 'amount', type: 'int128' }, { name: 'expiration', type: 'uint64' }, { name: 'nonce', type: 'uint64' }, diff --git a/src/ethereum.ts b/src/ethereum.ts index af36e8db..0443333a 100644 --- a/src/ethereum.ts +++ b/src/ethereum.ts @@ -70,7 +70,7 @@ const validateEthereumMsgResponse = function (res, req) { } else if (input.protocol === 'eip712') { const encoded = TypedDataUtils.eip712Hash( req.input.payload, - SignTypedDataVersion.V3, + SignTypedDataVersion.V4, ); const digest = prehash ? prehash : encoded; const chainId = parseInt(input.payload.domain.chainId, 16); @@ -709,7 +709,7 @@ function buildEIP712Request(req, input) { off += 2; const prehash = TypedDataUtils.eip712Hash( req.input.payload, - SignTypedDataVersion.V3, + SignTypedDataVersion.V4, ); const prehashBuf = Buffer.from(prehash); prehashBuf.copy(req.payload, off);