File tree Expand file tree Collapse file tree 2 files changed +6
-15
lines changed
packages/core/src/modules Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -661,6 +661,12 @@ export class CredentialsApi<CPs extends CredentialProtocol[]> implements Credent
661
661
return protocol . delete ( this . agentContext , credentialRecord , options )
662
662
}
663
663
664
+ async deleteByIdLd ( credentialId : string , options ?: DeleteCredentialOptions ) {
665
+ const credentialRecord = await this . getById ( credentialId )
666
+ const protocol = await this . getServiceForCredentialExchangeId ( credentialId )
667
+ return protocol . delete ( this . agentContext , credentialRecord , options )
668
+ }
669
+
664
670
/**
665
671
* Update a credential exchange record
666
672
*
Original file line number Diff line number Diff line change @@ -426,21 +426,6 @@ export class OutOfBandApi {
426
426
throw new CredoError ( 'One or both of handshake_protocols and requests~attach MUST be included in the message.' )
427
427
}
428
428
429
- // Make sure we haven't received this invitation before
430
- // It's fine if we created it (means that we are connecting to ourselves) or if it's an implicit
431
- // invitation (it allows to connect multiple times to the same public did)
432
- if ( ! config . isImplicit ) {
433
- const existingOobRecordsFromThisId = await this . outOfBandService . findAllByQuery ( this . agentContext , {
434
- invitationId : outOfBandInvitation . id ,
435
- role : OutOfBandRole . Receiver ,
436
- } )
437
- if ( existingOobRecordsFromThisId . length > 0 ) {
438
- throw new CredoError (
439
- `An out of band record with invitation ${ outOfBandInvitation . id } has already been received. Invitations should have a unique id.`
440
- )
441
- }
442
- }
443
-
444
429
const recipientKeyFingerprints = await this . resolveInvitationRecipientKeyFingerprints ( outOfBandInvitation )
445
430
const outOfBandRecord = new OutOfBandRecord ( {
446
431
role : OutOfBandRole . Receiver ,
You can’t perform that action at this time.
0 commit comments