Skip to content

Commit

Permalink
Revert "v10.6.3: reset getProviderPromise upon setting new providers"
Browse files Browse the repository at this point in the history
This reverts commit d87578d.
  • Loading branch information
10xSebastian committed Mar 21, 2023
1 parent d87578d commit 5947ff2
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 73 deletions.
7 changes: 0 additions & 7 deletions dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,13 @@ const getProviders = ()=> {
};

const setProvider$1 = (blockchain, provider)=> {
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}
getProviders()[blockchain] = provider;
};

const setProviderEndpoints$1 = async (blockchain, endpoints)=> {

let endpoint;
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}

if(
window.fetch == undefined ||
Expand Down
14 changes: 0 additions & 14 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,13 @@ const getProviders$1 = ()=> {
};

const setProvider$2 = (blockchain, provider)=> {
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}
getProviders$1()[blockchain] = provider;
};

const setProviderEndpoints$2 = async (blockchain, endpoints)=> {

let endpoint;
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}

if(
window.fetch == undefined ||
Expand Down Expand Up @@ -226,20 +219,13 @@ const getProviders = ()=> {
};

const setProvider$1 = (blockchain, provider)=> {
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}
getProviders()[blockchain] = provider;
};

const setProviderEndpoints$1 = async (blockchain, endpoints)=> {

let endpoint;
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}

if(
window.fetch == undefined ||
Expand Down
7 changes: 0 additions & 7 deletions dist/esm/index.solana.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,13 @@ const getProviders = ()=> {
};

const setProvider$1 = (blockchain, provider)=> {
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}
getProviders()[blockchain] = provider;
};

const setProviderEndpoints$1 = async (blockchain, endpoints)=> {

let endpoint;
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}

if(
window.fetch == undefined ||
Expand Down
7 changes: 0 additions & 7 deletions dist/umd/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,13 @@
};

const setProvider$1 = (blockchain, provider)=> {
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}
getProviders()[blockchain] = provider;
};

const setProviderEndpoints$1 = async (blockchain, endpoints)=> {

let endpoint;
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}

if(
window.fetch == undefined ||
Expand Down
14 changes: 0 additions & 14 deletions dist/umd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,13 @@
};

const setProvider$2 = (blockchain, provider)=> {
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}
getProviders$1()[blockchain] = provider;
};

const setProviderEndpoints$2 = async (blockchain, endpoints)=> {

let endpoint;
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}

if(
window.fetch == undefined ||
Expand Down Expand Up @@ -228,20 +221,13 @@
};

const setProvider$1 = (blockchain, provider)=> {
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}
getProviders()[blockchain] = provider;
};

const setProviderEndpoints$1 = async (blockchain, endpoints)=> {

let endpoint;
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}

if(
window.fetch == undefined ||
Expand Down
7 changes: 0 additions & 7 deletions dist/umd/index.solana.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,13 @@
};

const setProvider$1 = (blockchain, provider)=> {
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}
getProviders()[blockchain] = provider;
};

const setProviderEndpoints$1 = async (blockchain, endpoints)=> {

let endpoint;
let window = getWindow();
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined;
}

if(
window.fetch == undefined ||
Expand Down
2 changes: 1 addition & 1 deletion package.evm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-client-evm",
"moduleName": "Web3Client",
"version": "10.6.3",
"version": "10.6.2",
"description": "A web3 client to fetch blockchain data just like you are used to with HTTP clients.",
"main": "dist/umd/index.evm.js",
"module": "dist/esm/index.evm.js",
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.6.3",
"version": "10.6.2",
"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
2 changes: 1 addition & 1 deletion package.solana.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-client-solana",
"moduleName": "Web3Client",
"version": "10.6.3",
"version": "10.6.2",
"description": "A web3 client to fetch blockchain data just like you are used to with HTTP clients.",
"main": "dist/umd/index.solana.js",
"module": "dist/esm/index.solana.js",
Expand Down
7 changes: 0 additions & 7 deletions src/platforms/evm/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,13 @@ const getProviders = ()=> {
}

const setProvider = (blockchain, provider)=> {
let window = getWindow()
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined
}
getProviders()[blockchain] = provider
}

const setProviderEndpoints = async (blockchain, endpoints)=> {

let endpoint
let window = getWindow()
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined
}

if(
window.fetch == undefined ||
Expand Down
7 changes: 0 additions & 7 deletions src/platforms/solana/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,13 @@ const getProviders = ()=> {
}

const setProvider = (blockchain, provider)=> {
let window = getWindow()
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined
}
getProviders()[blockchain] = provider
}

const setProviderEndpoints = async (blockchain, endpoints)=> {

let endpoint
let window = getWindow()
if(window._getProviderPromise && window._getProviderPromise[blockchain]) {
window._getProviderPromise[blockchain] = undefined
}

if(
window.fetch == undefined ||
Expand Down

0 comments on commit 5947ff2

Please sign in to comment.