Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
fix: ipv6 naming with multiaddr-to-uri package (#81)
Browse files Browse the repository at this point in the history
* chore: use multiaddr-to-uri package

* fix: ipv6 naming with multiaddr-to-uri
  • Loading branch information
vasco-santos authored and jacobheun committed Jan 24, 2019
1 parent 24541d3 commit 93ef7c3
Show file tree
Hide file tree
Showing 4 changed files with 222 additions and 181 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"debug": "^4.1.1",
"interface-connection": "~0.3.2",
"mafmt": "^6.0.4",
"multiaddr-to-uri": "^4.0.1",
"pull-ws": "hugomrdias/pull-ws#fix/bundle-size"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const mafmt = require('mafmt')
const withIs = require('class-is')
const Connection = require('interface-connection').Connection

const maToUrl = require('./ma-to-url')
const toUri = require('multiaddr-to-uri')
const debug = require('debug')
const log = debug('libp2p:websockets:dialer')

Expand All @@ -18,9 +18,9 @@ class WebSockets {
options = {}
}

callback = callback || function () {}
callback = callback || function () { }

const url = maToUrl(ma)
const url = toUri(ma)
log('dialing %s', url)
const socket = connect(url, {
binary: true,
Expand Down
37 changes: 0 additions & 37 deletions src/ma-to-url.js

This file was deleted.

Loading

0 comments on commit 93ef7c3

Please sign in to comment.