@near-js/providers
Advanced tools
Comparing version 0.0.3 to 0.0.4
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -19,3 +42,2 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
const exponential_backoff_1 = require("./exponential-backoff"); | ||
const fetch_1 = __importDefault(require("./fetch")); | ||
const START_WAIT_TIME_MS = 1000; | ||
@@ -36,3 +58,6 @@ const BACKOFF_MULTIPLIER = 1.5; | ||
try { | ||
const response = yield (global.fetch || fetch_1.default)(connectionInfo.url, { | ||
if (!global.fetch) { | ||
global.fetch = (yield Promise.resolve().then(() => __importStar(require('./fetch')))).default; | ||
} | ||
const response = yield global.fetch(connectionInfo.url, { | ||
method: json ? 'POST' : 'GET', | ||
@@ -39,0 +64,0 @@ body: json ? json : undefined, |
{ | ||
"name": "@near-js/providers", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Library of implementations for interfacing with the NEAR blockchain", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
41369
774