Skip to content

Commit

Permalink
Remove process auth validator
Browse files Browse the repository at this point in the history
  • Loading branch information
Kolezhniuk committed Nov 29, 2024
1 parent 96d0bbb commit 69b4392
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 deletions src/iden3comm/handlers/contract-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
BasicHandlerOptions,
IProtocolMessageHandler
} from './message-handler';
import { prepareAuthV2ZeroKnowledgeResponse } from '../utils';
/**
* Interface that allows the processing of the contract request
*
Expand Down Expand Up @@ -129,27 +128,17 @@ export class ContractRequestHandler

const { scope = [] } = message.body;

let zkpResponses: ZeroKnowledgeProofResponse[] = [];

if (scope.length) {
zkpResponses = await processZeroKnowledgeProofRequests(
did,
scope,
verifierDid,
this._proofService,
{
ethSigner,
challenge,
supportedCircuits: this._supportedCircuits
}
);
} else {
zkpResponses = await prepareAuthV2ZeroKnowledgeResponse(
await ctx.ethSigner.getAddress(),
did,
this._proofService
);
}
const zkpResponses = await processZeroKnowledgeProofRequests(
did,
scope,
verifierDid,
this._proofService,
{
ethSigner,
challenge,
supportedCircuits: this._supportedCircuits
}
);

const methodId = message.body.transaction_data.method_id.replace('0x', '');
switch (methodId) {
Expand Down

0 comments on commit 69b4392

Please sign in to comment.