Skip to content

Commit

Permalink
waas-ethers: update signTypedData
Browse files Browse the repository at this point in the history
  • Loading branch information
patrislav committed Dec 16, 2024
1 parent e1fbf9f commit 53590ec
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/waas-ethers/src/signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ export class SequenceSigner extends ethers.AbstractSigner {
): Promise<string> {
await this._ensureNetworkValid(false)

const typedDataDigest = ethers.TypedDataEncoder.encode(domain, types, value)

const args = {
message: typedDataDigest,
typedData: {
domain,
types,
message: value,
},
network: await this.getSimpleNetwork(),
...authArgs
}
return this.sequence.signMessage(args).then(response => response.data.signature)
return this.sequence.signTypedData(args).then(response => response.data.signature)
}

async signTransaction(_transaction: ethers.TransactionRequest): Promise<string> {
Expand Down

0 comments on commit 53590ec

Please sign in to comment.