fix: use toB58String everywhere to be consistent (#537)

* chore: update deps

* fix: consistently use b58 peerid string

The migration to base32 will happen at a later date
This commit is contained in:
Jacob Heun
2020-01-22 11:47:30 +01:00
parent bb2e56e6c7
commit c1038bec92
14 changed files with 58 additions and 51 deletions

View File

@ -180,7 +180,7 @@ class IdentifyService {
const id = await PeerId.createFromPubKey(publicKey)
const peerInfo = new PeerInfo(id)
if (connection.remotePeer.toString() !== id.toString()) {
if (connection.remotePeer.toB58String() !== id.toB58String()) {
throw errCode(new Error('identified peer does not match the expected peer'), codes.ERR_INVALID_PEER)
}