Skip to content

Commit

Permalink
fix: Removed redundant auth sigs + switch to optional per case
Browse files Browse the repository at this point in the history
  • Loading branch information
Eengineer1 committed Dec 5, 2024
1 parent 88e70a0 commit 555a158
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/agent/ICheqd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6650,7 +6650,7 @@ export class Cheqd implements IAgentPlugin {
}

// validate dkgOptions
if (!options?.topArgs?.dkgOptions || !options.topArgs?.dkgOptions?.capacityDelegationAuthSignature) {
if (!options?.topArgs?.dkgOptions) {
throw new Error('[did-provider-cheqd]: dkgOptions is required');
}

Expand Down Expand Up @@ -6827,7 +6827,7 @@ export class Cheqd implements IAgentPlugin {
}

// validate dkgOptions
if (!options?.topArgs?.dkgOptions || !options.topArgs?.dkgOptions?.capacityDelegationAuthSignature) {
if (!options?.topArgs?.dkgOptions) {
throw new Error('[did-provider-cheqd]: dkgOptions is required');
}

Expand Down
4 changes: 2 additions & 2 deletions src/dkg-threshold/lit-protocol/v6.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class LitProtocol {
encryptedString: string,
stringHash: string,
unifiedAccessControlConditions: NonNullable<UnifiedAccessControlConditions>,
capacityDelegationAuthSig: GenericAuthSig
capacityDelegationAuthSig?: GenericAuthSig
): Promise<string> {
// generate session signatures
const sessionSigs = await this.client.getSessionSigs({
Expand All @@ -179,7 +179,7 @@ export class LitProtocol {
ability: LitAbility.AccessControlConditionDecryption,
},
],
capabilityAuthSigs: [capacityDelegationAuthSig],
capabilityAuthSigs: capacityDelegationAuthSig ? [capacityDelegationAuthSig] : undefined,
authNeededCallback: async ({}) => {
// generate auth signature
const authSig = await LitProtocol.generateAuthSignature(this.cosmosAuthWallet);
Expand Down

0 comments on commit 555a158

Please sign in to comment.