mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-23 05:51:37 +00:00
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:
@ -73,7 +73,7 @@ class Upgrader {
|
||||
if (this.metrics) {
|
||||
({ setTarget: setPeer, proxy: proxyPeer } = mutableProxy())
|
||||
const idString = (parseInt(Math.random() * 1e9)).toString(36) + Date.now()
|
||||
setPeer({ toString: () => idString })
|
||||
setPeer({ toB58String: () => idString })
|
||||
maConn = this.metrics.trackStream({ stream: maConn, remotePeer: proxyPeer })
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ class Upgrader {
|
||||
if (this.metrics) {
|
||||
({ setTarget: setPeer, proxy: proxyPeer } = mutableProxy())
|
||||
const idString = (parseInt(Math.random() * 1e9)).toString(36) + Date.now()
|
||||
setPeer({ toString: () => idString })
|
||||
setPeer({ toB58String: () => idString })
|
||||
maConn = this.metrics.trackStream({ stream: maConn, remotePeer: proxyPeer })
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user