Skip to content

Commit

Permalink
fix(light-account): light account v2 signatures should have sig type
Browse files Browse the repository at this point in the history
  • Loading branch information
moldy530 committed May 10, 2024
1 parent c505125 commit c3d6739
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/accounts/src/light-account/accounts/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,14 @@ export async function createLightAccountBase({
});
},
signUserOperationHash: async (uoHash: Hex) => {
return signer.signMessage({ raw: uoHash });
const signature = await signer.signMessage(uoHash);
switch (version) {
case "v2.0.0":
// TODO: handle case where signer is an SCA.
return concat([SignatureType.EOA, signature]);
default:
return signature;
}
},
async signMessage({ message }) {
switch (version as string) {
Expand Down

0 comments on commit c3d6739

Please sign in to comment.