From dbf4821139bf09fb97c350bed45c3ece32eb97cd Mon Sep 17 00:00:00 2001 From: Sebastian Pape <0xneo11@gmail.com> Date: Fri, 4 Oct 2024 17:07:28 +0200 Subject: [PATCH] v10.19.1: prevent setting undefined providers --- dev.html | 2 +- dist/esm/index.evm.js | 1 + dist/esm/index.js | 2 ++ dist/esm/index.solana.js | 1 + dist/umd/index.evm.js | 1 + dist/umd/index.js | 2 ++ dist/umd/index.solana.js | 1 + package.evm.json | 2 +- package.json | 2 +- package.solana.json | 2 +- src/platforms/evm/provider.js | 1 + src/platforms/solana/provider.js | 1 + 12 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dev.html b/dev.html index aed583a..d39997b 100644 --- a/dev.html +++ b/dev.html @@ -6,7 +6,7 @@ Development - + diff --git a/dist/esm/index.evm.js b/dist/esm/index.evm.js index e9f1229..118e3d6 100644 --- a/dist/esm/index.evm.js +++ b/dist/esm/index.evm.js @@ -233,6 +233,7 @@ const getAllProviders = ()=> { }; const setProvider$1 = (blockchain, provider)=> { + if(provider == undefined) { return } if(getAllProviders()[blockchain] === undefined) { getAllProviders()[blockchain] = []; } const index = getAllProviders()[blockchain].indexOf(provider); if(index > -1) { diff --git a/dist/esm/index.js b/dist/esm/index.js index 5af440f..00b60cc 100644 --- a/dist/esm/index.js +++ b/dist/esm/index.js @@ -176,6 +176,7 @@ const getAllProviders$1 = ()=> { }; const setProvider$2 = (blockchain, provider)=> { + if(provider == undefined) { return } if(getAllProviders$1()[blockchain] === undefined) { getAllProviders$1()[blockchain] = []; } const index = getAllProviders$1()[blockchain].indexOf(provider); if(index > -1) { @@ -422,6 +423,7 @@ const getAllProviders = ()=> { }; const setProvider$1 = (blockchain, provider)=> { + if(provider == undefined) { return } if(getAllProviders()[blockchain] === undefined) { getAllProviders()[blockchain] = []; } const index = getAllProviders()[blockchain].indexOf(provider); if(index > -1) { diff --git a/dist/esm/index.solana.js b/dist/esm/index.solana.js index 3dda765..695e355 100644 --- a/dist/esm/index.solana.js +++ b/dist/esm/index.solana.js @@ -167,6 +167,7 @@ const getAllProviders = ()=> { }; const setProvider$1 = (blockchain, provider)=> { + if(provider == undefined) { return } if(getAllProviders()[blockchain] === undefined) { getAllProviders()[blockchain] = []; } const index = getAllProviders()[blockchain].indexOf(provider); if(index > -1) { diff --git a/dist/umd/index.evm.js b/dist/umd/index.evm.js index 4899218..bd2e6bb 100644 --- a/dist/umd/index.evm.js +++ b/dist/umd/index.evm.js @@ -240,6 +240,7 @@ }; const setProvider$1 = (blockchain, provider)=> { + if(provider == undefined) { return } if(getAllProviders()[blockchain] === undefined) { getAllProviders()[blockchain] = []; } const index = getAllProviders()[blockchain].indexOf(provider); if(index > -1) { diff --git a/dist/umd/index.js b/dist/umd/index.js index a47f4ad..e9aa9aa 100644 --- a/dist/umd/index.js +++ b/dist/umd/index.js @@ -182,6 +182,7 @@ }; const setProvider$2 = (blockchain, provider)=> { + if(provider == undefined) { return } if(getAllProviders$1()[blockchain] === undefined) { getAllProviders$1()[blockchain] = []; } const index = getAllProviders$1()[blockchain].indexOf(provider); if(index > -1) { @@ -428,6 +429,7 @@ }; const setProvider$1 = (blockchain, provider)=> { + if(provider == undefined) { return } if(getAllProviders()[blockchain] === undefined) { getAllProviders()[blockchain] = []; } const index = getAllProviders()[blockchain].indexOf(provider); if(index > -1) { diff --git a/dist/umd/index.solana.js b/dist/umd/index.solana.js index 6dcd62c..e0f4067 100644 --- a/dist/umd/index.solana.js +++ b/dist/umd/index.solana.js @@ -173,6 +173,7 @@ }; const setProvider$1 = (blockchain, provider)=> { + if(provider == undefined) { return } if(getAllProviders()[blockchain] === undefined) { getAllProviders()[blockchain] = []; } const index = getAllProviders()[blockchain].indexOf(provider); if(index > -1) { diff --git a/package.evm.json b/package.evm.json index 08ac8af..3179fd0 100644 --- a/package.evm.json +++ b/package.evm.json @@ -1,7 +1,7 @@ { "name": "@depay/web3-client-evm", "moduleName": "Web3Client", - "version": "10.19.0", + "version": "10.19.1", "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", diff --git a/package.json b/package.json index 7a4fc58..7592e1d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@depay/web3-client", "moduleName": "Web3Client", - "version": "10.19.0", + "version": "10.19.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", diff --git a/package.solana.json b/package.solana.json index 446973f..7d30853 100644 --- a/package.solana.json +++ b/package.solana.json @@ -1,7 +1,7 @@ { "name": "@depay/web3-client-solana", "moduleName": "Web3Client", - "version": "10.19.0", + "version": "10.19.1", "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", diff --git a/src/platforms/evm/provider.js b/src/platforms/evm/provider.js index 4fba3db..c0d5897 100644 --- a/src/platforms/evm/provider.js +++ b/src/platforms/evm/provider.js @@ -10,6 +10,7 @@ const getAllProviders = ()=> { } const setProvider = (blockchain, provider)=> { + if(provider == undefined) { return } if(getAllProviders()[blockchain] === undefined) { getAllProviders()[blockchain] = [] } const index = getAllProviders()[blockchain].indexOf(provider) if(index > -1) { diff --git a/src/platforms/solana/provider.js b/src/platforms/solana/provider.js index bfb30b4..09ebd92 100644 --- a/src/platforms/solana/provider.js +++ b/src/platforms/solana/provider.js @@ -10,6 +10,7 @@ const getAllProviders = ()=> { } const setProvider = (blockchain, provider)=> { + if(provider == undefined) { return } if(getAllProviders()[blockchain] === undefined) { getAllProviders()[blockchain] = [] } const index = getAllProviders()[blockchain].indexOf(provider) if(index > -1) {