@@ -61,7 +61,7 @@ describe('DelegatedContentRouting', function () {
61
61
// Spawn our local node and bootstrap the bootstrapper node
62
62
const self = await spawnNode ( bootstrapId . addresses )
63
63
selfNode = self . node
64
- selfId = PeerId . createFromB58String ( self . id . id )
64
+ selfId = PeerId . parse ( self . id . id )
65
65
66
66
// Spawn the delegate node and bootstrap the bootstrapper node
67
67
const delegate = await spawnNode ( bootstrapId . addresses )
@@ -82,7 +82,7 @@ describe('DelegatedContentRouting', function () {
82
82
} )
83
83
84
84
it ( 'should accept an http api client instance at construction time' , ( ) => {
85
- const client = ipfsHttpClient ( {
85
+ const client = ipfsHttpClient . create ( {
86
86
protocol : 'http' ,
87
87
port : 8000 ,
88
88
host : 'localhost'
@@ -118,7 +118,7 @@ describe('DelegatedContentRouting', function () {
118
118
119
119
it ( 'should be able to find providers through the delegate node' , async function ( ) {
120
120
const opts = delegateNode . apiAddr . toOptions ( )
121
- const routing = new DelegatedContentRouting ( selfId , ipfsHttpClient ( {
121
+ const routing = new DelegatedContentRouting ( selfId , ipfsHttpClient . create ( {
122
122
protocol : 'http' ,
123
123
port : opts . port ,
124
124
host : opts . host
@@ -134,7 +134,7 @@ describe('DelegatedContentRouting', function () {
134
134
135
135
it ( 'should be able to specify a timeout' , async ( ) => {
136
136
const opts = delegateNode . apiAddr . toOptions ( )
137
- const routing = new DelegatedContentRouting ( selfId , ipfsHttpClient ( {
137
+ const routing = new DelegatedContentRouting ( selfId , ipfsHttpClient . create ( {
138
138
protocol : 'http' ,
139
139
port : opts . port ,
140
140
host : opts . host
@@ -149,7 +149,7 @@ describe('DelegatedContentRouting', function () {
149
149
describe ( 'provide' , ( ) => {
150
150
it ( 'should be able to register as a content provider to the delegate node' , async ( ) => {
151
151
const opts = delegateNode . apiAddr . toOptions ( )
152
- const contentRouter = new DelegatedContentRouting ( selfId , ipfsHttpClient ( {
152
+ const contentRouter = new DelegatedContentRouting ( selfId , ipfsHttpClient . create ( {
153
153
protocol : 'http' ,
154
154
port : opts . port ,
155
155
host : opts . host
@@ -167,7 +167,7 @@ describe('DelegatedContentRouting', function () {
167
167
168
168
it ( 'should provide non-dag-pb nodes via the delegate node' , async ( ) => {
169
169
const opts = delegateNode . apiAddr . toOptions ( )
170
- const contentRouter = new DelegatedContentRouting ( selfId , ipfsHttpClient ( {
170
+ const contentRouter = new DelegatedContentRouting ( selfId , ipfsHttpClient . create ( {
171
171
protocol : 'http' ,
172
172
port : opts . port ,
173
173
host : opts . host
0 commit comments