Skip to content

Commit

Permalink
Merge branch 'main' into fix/bbs-contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
karimStekelenburg committed May 23, 2022
2 parents e737cdf + 1c74618 commit c33a4b7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/core/src/modules/connections/DidExchangeProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import { DidKey } from '../dids/methods/key/DidKey'
import { getNumAlgoFromPeerDid, PeerDidNumAlgo } from '../dids/methods/peer/didPeer'
import { didDocumentJsonToNumAlgo1Did } from '../dids/methods/peer/peerDidNumAlgo1'
import { DidRecord, DidRepository } from '../dids/repository'
import { OutOfBandRole } from '../oob/domain/OutOfBandRole'
import { OutOfBandState } from '../oob/domain/OutOfBandState'

import { DidExchangeStateMachine } from './DidExchangeStateMachine'
import { DidExchangeProblemReportError, DidExchangeProblemReportReason } from './errors'
Expand Down Expand Up @@ -131,8 +133,9 @@ export class DidExchangeProtocol {
): Promise<ConnectionRecord> {
this.logger.debug(`Process message ${DidExchangeRequestMessage.type} start`, messageContext)

// TODO check oob role is sender
// TODO check oob state is await-response
outOfBandRecord.assertRole(OutOfBandRole.Sender)
outOfBandRecord.assertState(OutOfBandState.AwaitResponse)

// TODO check there is no connection record for particular oob record

const { did, mediatorId } = routing ? routing : outOfBandRecord
Expand Down

0 comments on commit c33a4b7

Please sign in to comment.