Skip to content

Commit

Permalink
add TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-roslaniec committed Jun 22, 2023
1 parent b67cbc9 commit ccdeba0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
11 changes: 3 additions & 8 deletions src/characters/pre-recipient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
}
}
2 changes: 2 additions & 0 deletions src/dkg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 2 additions & 5 deletions src/sdk/strategy/pre-strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
);
}
}

1 comment on commit ccdeba0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bundled size for the package is listed below:

build/module/types/ethers-contracts/factories: 82.03 KB
build/module/types/ethers-contracts: 156.25 KB
build/module/types: 160.16 KB
build/module/test: 42.97 KB
build/module/src/sdk/strategy: 31.25 KB
build/module/src/sdk: 46.88 KB
build/module/src/characters: 89.84 KB
build/module/src/conditions/context: 42.97 KB
build/module/src/conditions/predefined: 19.53 KB
build/module/src/conditions/base: 54.69 KB
build/module/src/conditions: 156.25 KB
build/module/src/agents: 31.25 KB
build/module/src/policies: 19.53 KB
build/module/src/kits: 19.53 KB
build/module/src: 429.69 KB
build/module: 687.50 KB
build/main/types/ethers-contracts/factories: 82.03 KB
build/main/types/ethers-contracts: 156.25 KB
build/main/types: 160.16 KB
build/main/test: 46.88 KB
build/main/src/sdk/strategy: 31.25 KB
build/main/src/sdk: 46.88 KB
build/main/src/characters: 89.84 KB
build/main/src/conditions/context: 42.97 KB
build/main/src/conditions/predefined: 19.53 KB
build/main/src/conditions/base: 54.69 KB
build/main/src/conditions: 156.25 KB
build/main/src/agents: 31.25 KB
build/main/src/policies: 19.53 KB
build/main/src/kits: 19.53 KB
build/main/src: 433.59 KB
build/main: 695.31 KB
build: 1.35 MB

Please sign in to comment.