Skip to content

Commit

Permalink
chore: apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Marcin Rataj <lidel@lidel.org>
  • Loading branch information
achingbrain and lidel authored Oct 24, 2023
1 parent 7fc45c1 commit b14ff94
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/client/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,9 @@ export class DefaultDelegatedRoutingV1HttpApiClient implements DelegatedRoutingV
record.Addrs = record.Addrs.map(multiaddr)
return record
} else if (record.Schema === 'bitswap') {
// Bitswap schema cannot have additional fields.
// Bitswap schema is deprecated, was incorrectly used when server had no information about actual protocols, so we convert it to peer result without protocol information.
return {
Schema: record.Schema,
Protocol: record.Protocol,
Schema: 'peer',
ID: peerIdFromString(record.ID),
Addrs: record.Addrs.map(multiaddr)
}
Expand Down

0 comments on commit b14ff94

Please sign in to comment.