diff --git a/src/characters/pre-recipient.ts b/src/characters/pre-recipient.ts index 1fb3066a5..ae0fc8cda 100644 --- a/src/characters/pre-recipient.ts +++ b/src/characters/pre-recipient.ts @@ -188,18 +188,13 @@ export class PreTDecDecrypter { public equals(other: PreTDecDecrypter): boolean { return ( this.porter.porterUrl.toString() === other.porter.porterUrl.toString() && - bytesEquals( - this.policyEncryptingKey.toCompressedBytes(), - other.policyEncryptingKey.toCompressedBytes() - ) && + this.policyEncryptingKey.equals(other.policyEncryptingKey) && + // TODO: Replace with `equals` after https://github.com/nucypher/nucypher-core/issues/56 is fixed bytesEquals( this.encryptedTreasureMap.toBytes(), other.encryptedTreasureMap.toBytes() ) && - bytesEquals( - this.publisherVerifyingKey.toCompressedBytes(), - other.publisherVerifyingKey.toCompressedBytes() - ) + this.publisherVerifyingKey.equals(other.publisherVerifyingKey) ); } } diff --git a/src/dkg.ts b/src/dkg.ts index 50798ce19..3569f3cc2 100644 --- a/src/dkg.ts +++ b/src/dkg.ts @@ -86,7 +86,9 @@ export class DkgRitual { public equals(other: DkgRitual): boolean { return ( this.id === other.id && + // TODO: Replace with `equals` after https://github.com/nucypher/nucypher-core/issues/56 is fixed bytesEquals(this.dkgPublicKey.toBytes(), other.dkgPublicKey.toBytes()) && + // TODO: Replace with `equals` after https://github.com/nucypher/nucypher-core/issues/56 is fixed bytesEquals( this.dkgPublicParams.toBytes(), other.dkgPublicParams.toBytes() diff --git a/src/sdk/strategy/pre-strategy.ts b/src/sdk/strategy/pre-strategy.ts index 24d46c132..acc6d997f 100644 --- a/src/sdk/strategy/pre-strategy.ts +++ b/src/sdk/strategy/pre-strategy.ts @@ -128,7 +128,7 @@ export class PreStrategy { public equals(other: PreStrategy) { return ( this.cohort.equals(other.cohort) && - // TODO: Add equality to WASM bindings + // TODO: Replace with `equals` after https://github.com/nucypher/nucypher-core/issues/56 is fixed bytesEquals( this.aliceSecretKey.toBEBytes(), other.aliceSecretKey.toBEBytes() @@ -201,10 +201,7 @@ export class DeployedPreStrategy { return ( this.cohort.equals(other.cohort) && this.decrypter.equals(other.decrypter) && - bytesEquals( - this.policyKey.toCompressedBytes(), - other.policyKey.toCompressedBytes() - ) + this.policyKey.equals(other.policyKey) ); } }