@@ -2,6 +2,7 @@ import type { AgentMessage } from '../../../agent/AgentMessage'
22import type { InboundMessageContext } from '../../../agent/models/InboundMessageContext'
33import type { Logger } from '../../../logger'
44import type { ConnectionRecord } from '../../connections'
5+ import type { AutoAcceptProof } from '../ProofAutoAcceptType'
56import type { ProofStateChangedEvent } from '../ProofEvents'
67import type { PresentationPreview , PresentationPreviewAttribute } from '../messages'
78import type { CredDef , IndyProof , Schema } from 'indy-sdk'
@@ -97,6 +98,7 @@ export class ProofService {
9798 presentationProposal : PresentationPreview ,
9899 config ?: {
99100 comment ?: string
101+ autoAcceptProof ?: AutoAcceptProof
100102 }
101103 ) : Promise < ProofProtocolMsgReturnType < ProposePresentationMessage > > {
102104 // Assert
@@ -114,6 +116,7 @@ export class ProofService {
114116 threadId : proposalMessage . threadId ,
115117 state : ProofState . ProposalSent ,
116118 proposalMessage,
119+ autoAcceptProof : config ?. autoAcceptProof ,
117120 } )
118121 await this . proofRepository . save ( proofRecord )
119122 this . eventEmitter . emit < ProofStateChangedEvent > ( {
@@ -273,6 +276,7 @@ export class ProofService {
273276 proofRequest : ProofRequest ,
274277 config ?: {
275278 comment ?: string
279+ autoAcceptProof ?: AutoAcceptProof
276280 }
277281 ) : Promise < ProofProtocolMsgReturnType < RequestPresentationMessage > > {
278282 // Assert
@@ -297,6 +301,7 @@ export class ProofService {
297301 threadId : requestPresentationMessage . threadId ,
298302 requestMessage : requestPresentationMessage ,
299303 state : ProofState . RequestSent ,
304+ autoAcceptProof : config ?. autoAcceptProof ,
300305 } )
301306
302307 await this . proofRepository . save ( proofRecord )
0 commit comments