Skip to content

Commit 789c064

Browse files
committed
refactor: undo aa-sdk change, require using inner signTypedData function for deferred actions
1 parent 7287c53 commit 789c064

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

aa-sdk/core/src/actions/smartAccount/signTypedData.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,5 @@ export const signTypedData: <
3838
throw new AccountNotFoundError();
3939
}
4040

41-
// We must bypass 6492 if we're signing a deferred action
42-
if (
43-
typedData.primaryType === "DeferredAction" &&
44-
typedData.domain?.verifyingContract === account.address
45-
) {
46-
return account.signTypedData(typedData);
47-
}
48-
4941
return account.signTypedDataWith6492(typedData);
5042
};

account-kit/smart-contracts/src/ma-v2/client/client.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,10 @@ describe("MA v2 Tests", async () => {
368368
isGlobalValidation: isGlobalValidation,
369369
});
370370

371-
// Sign the typed data using the owner (fallback) validation
372-
const deferredValidationSig = await provider.signTypedData({
373-
typedData: typedData,
374-
});
371+
// Sign the typed data using the owner (fallback) validation, this must be done via the account to skip 6492
372+
const deferredValidationSig = await provider.account.signTypedData(
373+
typedData
374+
);
375375

376376
// Build the full hex to prepend to the UO signature
377377
// This MUST be done with the *same* client that has signed the typed data
@@ -503,9 +503,9 @@ describe("MA v2 Tests", async () => {
503503
});
504504

505505
// Sign the typed data using the first session key
506-
const deferredValidationSig = await sessionKeyClient.signTypedData({
507-
typedData: typedData,
508-
});
506+
const deferredValidationSig = await sessionKeyClient.account.signTypedData(
507+
typedData
508+
);
509509

510510
// Build the full hex to prepend to the UO signature
511511
// This MUST be done with the *same* client that has signed the typed data

0 commit comments

Comments
 (0)