Skip to content

Commit

Permalink
v10.1.1: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
10xSebastian committed Oct 20, 2022
1 parent a75b8ce commit c9d0166
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
6 changes: 3 additions & 3 deletions dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -15211,7 +15211,9 @@ const setProviderEndpoints$1 = async (blockchain, endpoints)=> {
let endpoint;
let window = getWindow();

if(window.fetch != undefined) {
if(window.fetch == undefined || (process && process.env && "production" == 'test')) {
endpoint = endpoints[0];
} else {

let responseTimes = await Promise.all(endpoints.map((endpoint)=>{
return new Promise(async (resolve)=>{
Expand All @@ -15235,8 +15237,6 @@ const setProviderEndpoints$1 = async (blockchain, endpoints)=> {
const fastestResponse = Math.min(...responseTimes);
const fastestIndex = responseTimes.indexOf(fastestResponse);
endpoint = endpoints[fastestIndex];
} else {
endpoint = endpoints[0];
}

setProvider$1(
Expand Down
12 changes: 6 additions & 6 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15212,7 +15212,9 @@ const setProviderEndpoints$2 = async (blockchain, endpoints)=> {
let endpoint;
let window = getWindow();

if(window.fetch != undefined) {
if(window.fetch == undefined || (process && process.env && "production" == 'test')) {
endpoint = endpoints[0];
} else {

let responseTimes = await Promise.all(endpoints.map((endpoint)=>{
return new Promise(async (resolve)=>{
Expand All @@ -15236,8 +15238,6 @@ const setProviderEndpoints$2 = async (blockchain, endpoints)=> {
const fastestResponse = Math.min(...responseTimes);
const fastestIndex = responseTimes.indexOf(fastestResponse);
endpoint = endpoints[fastestIndex];
} else {
endpoint = endpoints[0];
}

setProvider$2(
Expand Down Expand Up @@ -15476,7 +15476,9 @@ const setProviderEndpoints$1 = async (blockchain, endpoints)=> {
let endpoint;
let window = getWindow();

if(window.fetch != undefined) {
if(window.fetch == undefined || (process && process.env && "production" == 'test')) {
endpoint = endpoints[0];
} else {

let responseTimes = await Promise.all(endpoints.map((endpoint)=>{
return new Promise(async (resolve)=>{
Expand All @@ -15500,8 +15502,6 @@ const setProviderEndpoints$1 = async (blockchain, endpoints)=> {
const fastestResponse = Math.min(...responseTimes);
const fastestIndex = responseTimes.indexOf(fastestResponse);
endpoint = endpoints[fastestIndex];
} else {
endpoint = endpoints[0];
}

setProvider$1(
Expand Down
6 changes: 3 additions & 3 deletions dist/umd/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -15214,7 +15214,9 @@
let endpoint;
let window = getWindow();

if(window.fetch != undefined) {
if(window.fetch == undefined || (process && process.env && "production" == 'test')) {
endpoint = endpoints[0];
} else {

let responseTimes = await Promise.all(endpoints.map((endpoint)=>{
return new Promise(async (resolve)=>{
Expand All @@ -15238,8 +15240,6 @@
const fastestResponse = Math.min(...responseTimes);
const fastestIndex = responseTimes.indexOf(fastestResponse);
endpoint = endpoints[fastestIndex];
} else {
endpoint = endpoints[0];
}

setProvider$1(
Expand Down
12 changes: 6 additions & 6 deletions dist/umd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15214,7 +15214,9 @@
let endpoint;
let window = getWindow();

if(window.fetch != undefined) {
if(window.fetch == undefined || (process && process.env && "production" == 'test')) {
endpoint = endpoints[0];
} else {

let responseTimes = await Promise.all(endpoints.map((endpoint)=>{
return new Promise(async (resolve)=>{
Expand All @@ -15238,8 +15240,6 @@
const fastestResponse = Math.min(...responseTimes);
const fastestIndex = responseTimes.indexOf(fastestResponse);
endpoint = endpoints[fastestIndex];
} else {
endpoint = endpoints[0];
}

setProvider$2(
Expand Down Expand Up @@ -15478,7 +15478,9 @@
let endpoint;
let window = getWindow();

if(window.fetch != undefined) {
if(window.fetch == undefined || (process && process.env && "production" == 'test')) {
endpoint = endpoints[0];
} else {

let responseTimes = await Promise.all(endpoints.map((endpoint)=>{
return new Promise(async (resolve)=>{
Expand All @@ -15502,8 +15504,6 @@
const fastestResponse = Math.min(...responseTimes);
const fastestIndex = responseTimes.indexOf(fastestResponse);
endpoint = endpoints[fastestIndex];
} else {
endpoint = endpoints[0];
}

setProvider$1(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-client",
"moduleName": "Web3Client",
"version": "10.1.0",
"version": "10.1.1",
"description": "A web3 client to fetch blockchain data just like you are used to with HTTP clients.",
"main": "dist/umd/index.js",
"module": "dist/esm/index.js",
Expand Down
6 changes: 3 additions & 3 deletions src/platforms/evm/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ const setProviderEndpoints = async (blockchain, endpoints)=> {
let endpoint
let window = getWindow()

if(window.fetch != undefined) {
if(window.fetch == undefined || (process && process.env && process.env.NODE_ENV == 'test')) {
endpoint = endpoints[0]
} else {

let responseTimes = await Promise.all(endpoints.map((endpoint)=>{
return new Promise(async (resolve)=>{
Expand All @@ -48,8 +50,6 @@ const setProviderEndpoints = async (blockchain, endpoints)=> {
const fastestResponse = Math.min(...responseTimes)
const fastestIndex = responseTimes.indexOf(fastestResponse)
endpoint = endpoints[fastestIndex]
} else {
endpoint = endpoints[0]
}

setProvider(
Expand Down
6 changes: 3 additions & 3 deletions src/platforms/solana/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ const setProviderEndpoints = async (blockchain, endpoints)=> {
let endpoint
let window = getWindow()

if(window.fetch != undefined) {
if(window.fetch == undefined || (process && process.env && process.env.NODE_ENV == 'test')) {
endpoint = endpoints[0]
} else {

let responseTimes = await Promise.all(endpoints.map((endpoint)=>{
return new Promise(async (resolve)=>{
Expand All @@ -45,8 +47,6 @@ const setProviderEndpoints = async (blockchain, endpoints)=> {
const fastestResponse = Math.min(...responseTimes)
const fastestIndex = responseTimes.indexOf(fastestResponse)
endpoint = endpoints[fastestIndex]
} else {
endpoint = endpoints[0]
}

setProvider(
Expand Down

0 comments on commit c9d0166

Please sign in to comment.