Skip to content

Commit

Permalink
chore: make identify conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Jun 12, 2024
1 parent 74621ea commit f27ee6e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/transport-circuit-relay-v2/src/transport/transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,16 @@ export class CircuitRelayTransport implements Transport {
'@libp2p/circuit-relay-v2-transport'
]

readonly [serviceDependencies]: string[] = [
'@libp2p/identify'
]
get [serviceDependencies] (): string[] {
// we only need identify if discovery is enabled
if (this.discovery != null) {
return [
'@libp2p/identify'
]
}

return []
}

Check warning on line 124 in packages/transport-circuit-relay-v2/src/transport/transport.ts

View check run for this annotation

Codecov / codecov/patch

packages/transport-circuit-relay-v2/src/transport/transport.ts#L116-L124

Added lines #L116 - L124 were not covered by tests

readonly [transportSymbol] = true

Expand Down

0 comments on commit f27ee6e

Please sign in to comment.