Skip to content

Commit

Permalink
[fix] serializeErc6492Signature should get factory address, not accou…
Browse files Browse the repository at this point in the history
…nt address
  • Loading branch information
coffeexcoin committed Oct 22, 2024
1 parent 8fe8c8d commit fc216b7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/agw-client/src/transformEIP1193Provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ import {
import { toAccount } from 'viem/accounts';

import { createAbstractClient } from './abstractClient.js';
import { VALIDATOR_ADDRESS } from './constants.js';
import {
SMART_ACCOUNT_FACTORY_ADDRESS,
VALIDATOR_ADDRESS,
} from './constants.js';
import {
getInitializerCalldata,
getSmartAccountAddressFromInitialSigner,
Expand Down Expand Up @@ -98,7 +101,7 @@ async function getAgwTypedSignature(
);

return serializeErc6492Signature({
address: account,
address: SMART_ACCOUNT_FACTORY_ADDRESS,
data: getInitializerCalldata(signer, VALIDATOR_ADDRESS, {
target: zeroAddress,
allowFailure: false,
Expand All @@ -107,8 +110,6 @@ async function getAgwTypedSignature(
}),
signature,
});

return signature;
}

export function transformEIP1193Provider(
Expand Down

0 comments on commit fc216b7

Please sign in to comment.