Skip to content

Commit

Permalink
feat: verify consent proof signature
Browse files Browse the repository at this point in the history
Verified consent proofs
Added tests for consent proofs
  • Loading branch information
Alex Risch authored and Alex Risch committed Apr 24, 2024
1 parent 7cfb79d commit acf204b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/conversations/Conversations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,7 @@ export default class Conversations<ContentTypes = any> {
const digest = hexToBytes(hashMessage(message))
// Recover public key
const publicKey = ecdsaSignerKey(digest, signatureData)
if (!publicKey) {
return false
}
console.log('Recovered public key: ', typeof publicKey)
console.log('here1116', publicKey.getEthereumAddress())
return publicKey.getEthereumAddress() === this.client.address
return publicKey?.getEthereumAddress() === this.client.address
}

private async handleConsentProof(
Expand Down

0 comments on commit acf204b

Please sign in to comment.