Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/spotty-ladybugs-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@crossmint/wallets-sdk": minor
---

feat: add isSmartWalletSignature parameter to signTypedData
4 changes: 2 additions & 2 deletions packages/wallets/src/wallets/evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class EVMWallet extends Wallet<EVMChain> {
public async signTypedData<T extends SignTypedDataInput>(
params: T
): Promise<Signature<T["options"] extends PrepareOnly<true> ? true : false>> {
const { domain, message, primaryType, types, chain } = params;
const { domain, message, primaryType, types, chain, isSmartWalletSignature = false } = params;
if (!domain || !message || !types || !chain) {
throw new InvalidTypedDataError("Invalid typed data");
}
Expand All @@ -110,7 +110,7 @@ export class EVMWallet extends Wallet<EVMChain> {
},
signer: this.signer.locator(),
chain,
isSmartWalletSignature: false,
isSmartWalletSignature,
},
});
if ("error" in signatureCreationResponse) {
Expand Down
1 change: 1 addition & 0 deletions packages/wallets/src/wallets/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export type SignMessageInput = {
export type SignTypedDataInput = TypedDataDefinition<TypedData, string> & {
chain: EVMSmartWalletChain;
options?: SignatureInputOptions;
isSmartWalletSignature?: boolean;
};

export type ApproveResult<T extends ApproveParams> = T extends { transactionId: string }
Expand Down