Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
ZumZoom committed Mar 26, 2024
1 parent c982626 commit b5718d0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/contracts/BySig.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import { loadFixture } from '@nomicfoundation/hardhat-network-helpers';
import { ethers } from 'hardhat';
import { NonceType, buildBySigTraits } from './BySigTraits.test';

function hashBySig(name: string, version: string, chainId: bigint, verifyingContract: string, sig: Record<string, any>): string { // eslint-disable-line @typescript-eslint/no-explicit-any
interface SignedCallStruct {
traits: bigint;
data: string;
}

function hashBySig(name: string, version: string, chainId: bigint, verifyingContract: string, sig: SignedCallStruct): string {
const domain = { name, version, chainId, verifyingContract };
const types = {
SignedCall: [
Expand Down Expand Up @@ -82,7 +87,7 @@ describe('BySig', function () {
const sig = {
traits: buildBySigTraits(),
data: '0x',
} as any; // eslint-disable-line @typescript-eslint/no-explicit-any
};
expect(await token.hashBySig(sig)).to.be.equal(hashBySig(await token.name(), eip712Version, await token.getChainId(), await token.getAddress(), sig));
});
});
Expand Down

0 comments on commit b5718d0

Please sign in to comment.