Skip to content

Commit

Permalink
fix: replace processSignature
Browse files Browse the repository at this point in the history
  • Loading branch information
ieow committed Apr 12, 2024
1 parent db52e42 commit 36e8adb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/providers/ethereum-mpc-provider/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3auth/ethereum-mpc-provider",
"version": "8.0.1",
"version": "8.1.0",
"homepage": "https://github.com/Web3Auth/Web3Auth#readme",
"license": "ISC",
"main": "dist/ethereumMpcProvider.cjs.js",
Expand All @@ -26,7 +26,7 @@
"@metamask/rpc-errors": "^6.2.1",
"@toruslabs/base-controllers": "^5.5.5",
"@toruslabs/http-helpers": "^6.1.1",
"@toruslabs/openlogin-jrpc": "^8.0.0",
"@toruslabs/openlogin-jrpc": "^8.1.0",
"@web3auth/base": "^8.1.0",
"@web3auth/base-provider": "^8.1.0",
"@web3auth/ethereum-provider": "^8.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ async function signTx(
modifiedV = modifiedV + 27;
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const tx = (unsignedEthTx as any)._processSignature(BigInt(modifiedV), r, s);
const tx = unsignedEthTx.addSignature(BigInt(modifiedV), r, s);

// Hack part 2
if (hackApplied) {
Expand All @@ -71,7 +70,8 @@ async function signTx(
}
}

return tx.serialize();
// should we return uint8array or buffer?
return Buffer.from(tx.serialize());
}

async function signMessage(sign: (msgHash: Buffer, rawMsg?: Buffer) => Promise<{ v: number; r: Buffer; s: Buffer }>, data: string) {
Expand Down

0 comments on commit 36e8adb

Please sign in to comment.