@filecoin-shipyard/lotus-client-provider-browser
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -23,2 +23,4 @@ class BrowserProvider { | ||
} | ||
this.WebSocket = options.WebSocket || globalThis.WebSocket | ||
this.fetch = options.fetch || globalThis.fetch | ||
} | ||
@@ -31,3 +33,3 @@ | ||
if (this.transport !== 'ws') return resolve() | ||
this.ws = new WebSocket(this.url) | ||
this.ws = new this.WebSocket(this.url) | ||
// FIXME: reject on error or timeout | ||
@@ -82,3 +84,3 @@ this.ws.onopen = function () { | ||
} | ||
const response = await fetch(this.httpUrl, { | ||
const response = await this.fetch(this.httpUrl, { | ||
method: 'POST', | ||
@@ -229,3 +231,3 @@ headers, | ||
} | ||
const response = await fetch(this.importUrl, { | ||
const response = await this.fetch(this.importUrl, { | ||
method: 'PUT', | ||
@@ -232,0 +234,0 @@ headers, |
{ | ||
"name": "@filecoin-shipyard/lotus-client-provider-browser", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"author": "Jim Pick (@jimpick)", | ||
@@ -8,4 +8,3 @@ "license": "(Apache-2.0 AND MIT)", | ||
"globals": [ | ||
"WebSocket", | ||
"fetch" | ||
"globalThis" | ||
] | ||
@@ -31,4 +30,9 @@ }, | ||
"import": "./index.js" | ||
}, | ||
"./dual-publish-tmp/package.json": "./dual-publish-tmp/package.json", | ||
"./dual-publish-tmp": { | ||
"require": "./dual-publish-tmp/index.cjs", | ||
"import": "./dual-publish-tmp/index.js" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
17666
482
0