diff --git a/packages/waas-ethers/src/signer.ts b/packages/waas-ethers/src/signer.ts index f51a9401e..34a8e652b 100644 --- a/packages/waas-ethers/src/signer.ts +++ b/packages/waas-ethers/src/signer.ts @@ -49,12 +49,22 @@ export class SequenceSigner extends ethers.AbstractSigner { return this.sequence.signMessage(args).then(response => response.data.signature) } - signTypedData( + async signTypedData( domain: ethers.TypedDataDomain, types: Record, - value: Record + value: Record, + authArgs?: CommonAuthArgs ): Promise { - throw new Error('SequenceSigner does not support signTypedData') + await this._ensureNetworkValid(false) + + const typedDataDigest = ethers.TypedDataEncoder.encode(domain, types, value) + + const args = { + message: typedDataDigest, + network: await this.getSimpleNetwork(), + ...authArgs + } + return this.sequence.signMessage(args).then(response => response.data.signature) } async signTransaction(_transaction: ethers.TransactionRequest): Promise {