Skip to content

Commit

Permalink
v10.19.1: prevent setting undefined providers
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 committed Oct 4, 2024
1 parent 92011fb commit dbf4821
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link rel="icon" type="image/png" href="https://depay.com/favicon.png"/>
<title>Development</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://cdn.ethers.io/lib/ethers-5.7.umd.min.js" type="application/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ethers/5.7.1/ethers.umd.min.js" type="application/javascript"></script>
<script crossorigin src="https://unpkg.com/@depay/solana-web3.js@1"></script>
<script crossorigin src="https://unpkg.com/@depay/[email protected]"></script>
<script src="tmp/index.dev.js"></script>
Expand Down
1 change: 1 addition & 0 deletions dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions dist/esm/index.solana.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions dist/umd/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions dist/umd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions dist/umd/index.solana.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
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.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",
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.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",
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.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",
Expand Down
1 change: 1 addition & 0 deletions src/platforms/evm/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions src/platforms/solana/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dbf4821

Please sign in to comment.