Skip to content

Commit

Permalink
simplify signature fix (#1304)
Browse files Browse the repository at this point in the history
Co-authored-by: ani <ani@Anirudhs-MacBook-Pro.local>
  • Loading branch information
anihamde and ani committed Feb 20, 2024
1 parent 26a3ebb commit 698b894
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions express_relay/sdk/js/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export class Client {
{ name: "calldata", type: "bytes" },
{ name: "value", type: "uint256" },
{ name: "bid", type: "uint256" },
{ name: "validUntil", type: "uint256" },
],
[
opportunity.repayTokens.map(convertTokenQty),
Expand All @@ -240,12 +241,11 @@ export class Client {
opportunity.calldata,
opportunity.value,
bidInfo.amount,
bidInfo.validUntil,
]
);

const msgHash = keccak256(
encodePacked(["bytes", "uint256"], [payload, bidInfo.validUntil])
);
const msgHash = keccak256(payload);

const hash = signatureToHex(await sign({ hash: msgHash, privateKey }));
return {
Expand Down

0 comments on commit 698b894

Please sign in to comment.