@walletconnect/http-connection
Advanced tools
Comparing version 1.0.0-beta.61 to 1.0.0-beta.62
/// <reference types="node" /> | ||
import EventEmitter from 'events'; | ||
import EventEmitter from "events"; | ||
interface IXHRPost { | ||
@@ -4,0 +4,0 @@ method: string; |
@@ -8,4 +8,3 @@ "use strict"; | ||
const _window = window; | ||
const XHR = typeof _window !== 'undefined' && | ||
typeof _window.XMLHttpRequest !== 'undefined' | ||
const XHR = typeof _window !== "undefined" && typeof _window.XMLHttpRequest !== "undefined" | ||
? _window.XMLHttpRequest | ||
@@ -20,4 +19,4 @@ : xhr2_cookies_1.XMLHttpRequest; | ||
body: null, | ||
headers: { 'Content-Type': 'application/json' }, | ||
method: 'POST' | ||
headers: { "Content-Type": "application/json" }, | ||
method: "POST", | ||
}; | ||
@@ -29,3 +28,3 @@ } | ||
id: payload.id, | ||
jsonrpc: payload.jsonrpc | ||
jsonrpc: payload.jsonrpc, | ||
}; | ||
@@ -35,4 +34,4 @@ } | ||
return new Promise(resolve => { | ||
if (payload.method === 'eth_subscribe') { | ||
const error = this.formatError(payload, 'Subscriptions are not supported by this HTTP endpoint'); | ||
if (payload.method === "eth_subscribe") { | ||
const error = this.formatError(payload, "Subscriptions are not supported by this HTTP endpoint"); | ||
return resolve(error); | ||
@@ -64,3 +63,3 @@ } | ||
} | ||
xhr.open('POST', this.url, true); | ||
xhr.open("POST", this.url, true); | ||
xhr.timeout = 60 * 1000; | ||
@@ -67,0 +66,0 @@ xhr.onerror = res; |
{ | ||
"name": "@walletconnect/http-connection", | ||
"version": "1.0.0-beta.61", | ||
"version": "1.0.0-beta.62", | ||
"description": "Http Connection for WalletConnect Providers", | ||
@@ -62,4 +62,4 @@ "scripts": { | ||
"dependencies": { | ||
"@walletconnect/types": "^1.0.0-beta.61", | ||
"@walletconnect/utils": "^1.0.0-beta.61", | ||
"@walletconnect/types": "^1.0.0-beta.62", | ||
"@walletconnect/utils": "^1.0.0-beta.62", | ||
"xhr2-cookies": "1.1.0" | ||
@@ -66,0 +66,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
288106
393