Skip to content

Commit d9c767b

Browse files
authored
Merge pull request #12 from gitcoinco/par-859
fix: recover address logic
2 parents 3feb62d + eba132c commit d9c767b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { createLogger } from '@/logger';
22
import { type Request, type Response } from 'express';
33
import { validationResult } from 'express-validator';
44
import deterministicHash from 'deterministic-object-hash';
5-
import { type Hex, keccak256, recoverAddress, toHex } from 'viem';
5+
import { type Hex, keccak256, recoverMessageAddress, toHex } from 'viem';
66
import { indexerClient } from './ext/indexer';
77
import { env } from './env';
88

@@ -47,8 +47,8 @@ export async function recoverSignerAddress<T>(
4747
obj: T,
4848
signature: Hex
4949
): Promise<Hex> {
50-
return await recoverAddress({
51-
hash: await deterministicKeccakHash(obj),
50+
return await recoverMessageAddress({
51+
message: await deterministicKeccakHash(obj),
5252
signature,
5353
});
5454
}

0 commit comments

Comments
 (0)