monkey patch base64 IDs to base58 for now
This commit is contained in:
parent
9fe47c2b9f
commit
d60b639b1c
|
@ -1,6 +1,7 @@
|
|||
// @ts-ignore
|
||||
const DuplexPair = require('pull-pair/duplex') // @ts-ignore
|
||||
const Notify = require('pull-notify')
|
||||
const bs58 = require('bs58')
|
||||
const debug = require('debug')('ppppp:hub-client')
|
||||
const makeTunnelPlugin = require('./ms-tunnel')
|
||||
const { ErrorDuplex } = require('./utils')
|
||||
|
@ -51,7 +52,8 @@ module.exports = {
|
|||
*/
|
||||
connect(origin) {
|
||||
// @ts-ignore
|
||||
const hub = this.id // FIXME: this comes from secret-stack
|
||||
// FIXME: this comes from secret-stack
|
||||
const hub = bs58.encode(Buffer.from(this.id, 'base64'))
|
||||
debug('received hubClient.connect(%s) via hub %s', origin, hub)
|
||||
if (hubs.has(hub) && origin) {
|
||||
debug('connect() will resolve because handler exists')
|
||||
|
|
Loading…
Reference in New Issue