Skip to content

Commit

Permalink
v13.12.10: fix fetching assets race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 committed Oct 22, 2024
1 parent 4751f5b commit 1fb1ff0
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 56 deletions.
4 changes: 2 additions & 2 deletions dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<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/web3-blockchains@9"></script>
<script crossorigin src="https://unpkg.com/@depay/[email protected].1"></script>
<script crossorigin src="https://unpkg.com/@depay/[email protected].2"></script>
<script crossorigin src="https://unpkg.com/@depay/walletconnect-v2@2"></script>
<script crossorigin src="https://unpkg.com/@depay/[email protected]"></script>
<script crossorigin src="https://unpkg.com/@depay/web3-tokens@10"></script>
<script crossorigin src="https://unpkg.com/@depay/web3-assets@7"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/web3-assets@7.4.1"></script>
<script crossorigin src="https://unpkg.com/@depay/[email protected]"></script>
<script src="tmp/index.dev.js"></script>
<link rel="stylesheet" href="https://unpkg.com/bootstrap@4/dist/css/bootstrap.css">
Expand Down
12 changes: 9 additions & 3 deletions dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -47305,6 +47305,7 @@ class StaticJsonRpcBatchProvider$1 extends ethers.providers.JsonRpcProvider {
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -47459,7 +47460,8 @@ const setProviderEndpoints$2 = async (blockchain, endpoints, detectFastest = tru
},
referrer: "",
referrerPolicy: "no-referrer",
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' })
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' }),
signal: AbortSignal.timeout(10000) // 10-second timeout
});
} catch (e) {}
if(!_optionalChain$4$1([response, 'optionalAccess', _ => _.ok])) { return resolve(999) }
Expand Down Expand Up @@ -47562,6 +47564,7 @@ class StaticJsonRpcSequentialProvider extends Connection {
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -47706,7 +47709,8 @@ const setProviderEndpoints$1$1 = async (blockchain, endpoints, detectFastest = t
},
referrer: "",
referrerPolicy: "no-referrer",
body: JSON.stringify({ method: 'getIdentity', id: 1, jsonrpc: '2.0' })
body: JSON.stringify({ method: 'getIdentity', id: 1, jsonrpc: '2.0' }),
signal: AbortSignal.timeout(10000) // 10-second timeout
});
} catch (e) {}
if(!_optionalChain$2$2([response, 'optionalAccess', _ => _.ok])) { return resolve(999) }
Expand Down Expand Up @@ -50546,6 +50550,7 @@ class StaticJsonRpcBatchProvider extends ethers.providers.JsonRpcProvider {
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -50700,7 +50705,8 @@ const setProviderEndpoints$1 = async (blockchain, endpoints, detectFastest = tru
},
referrer: "",
referrerPolicy: "no-referrer",
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' })
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' }),
signal: AbortSignal.timeout(10000) // 10-second timeout
});
} catch (e) {}
if(!_optionalChain$1$1([response, 'optionalAccess', _ => _.ok])) { return resolve(999) }
Expand Down
8 changes: 6 additions & 2 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ class StaticJsonRpcBatchProvider extends ethers.providers.JsonRpcProvider {
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -330,7 +331,8 @@ const setProviderEndpoints$2 = async (blockchain, endpoints, detectFastest = tru
},
referrer: "",
referrerPolicy: "no-referrer",
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' })
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' }),
signal: AbortSignal.timeout(10000) // 10-second timeout
});
} catch (e) {}
if(!_optionalChain$4([response, 'optionalAccess', _ => _.ok])) { return resolve(999) }
Expand Down Expand Up @@ -433,6 +435,7 @@ class StaticJsonRpcSequentialProvider extends Connection {
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -577,7 +580,8 @@ const setProviderEndpoints$1 = async (blockchain, endpoints, detectFastest = tru
},
referrer: "",
referrerPolicy: "no-referrer",
body: JSON.stringify({ method: 'getIdentity', id: 1, jsonrpc: '2.0' })
body: JSON.stringify({ method: 'getIdentity', id: 1, jsonrpc: '2.0' }),
signal: AbortSignal.timeout(10000) // 10-second timeout
});
} catch (e) {}
if(!_optionalChain$2([response, 'optionalAccess', _ => _.ok])) { return resolve(999) }
Expand Down
8 changes: 6 additions & 2 deletions dist/esm/index.solana.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ class StaticJsonRpcBatchProvider extends ethers.providers.JsonRpcProvider {
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -330,7 +331,8 @@ const setProviderEndpoints$2 = async (blockchain, endpoints, detectFastest = tru
},
referrer: "",
referrerPolicy: "no-referrer",
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' })
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' }),
signal: AbortSignal.timeout(10000) // 10-second timeout
});
} catch (e) {}
if(!_optionalChain$4$1([response, 'optionalAccess', _ => _.ok])) { return resolve(999) }
Expand Down Expand Up @@ -433,6 +435,7 @@ class StaticJsonRpcSequentialProvider extends Connection {
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -577,7 +580,8 @@ const setProviderEndpoints$1 = async (blockchain, endpoints, detectFastest = tru
},
referrer: "",
referrerPolicy: "no-referrer",
body: JSON.stringify({ method: 'getIdentity', id: 1, jsonrpc: '2.0' })
body: JSON.stringify({ method: 'getIdentity', id: 1, jsonrpc: '2.0' }),
signal: AbortSignal.timeout(10000) // 10-second timeout
});
} catch (e) {}
if(!_optionalChain$2$1([response, 'optionalAccess', _ => _.ok])) { return resolve(999) }
Expand Down
12 changes: 9 additions & 3 deletions dist/umd/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -47311,6 +47311,7 @@
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -47465,7 +47466,8 @@
},
referrer: "",
referrerPolicy: "no-referrer",
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' })
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' }),
signal: AbortSignal.timeout(10000) // 10-second timeout
});
} catch (e) {}
if(!_optionalChain$4$1([response, 'optionalAccess', _ => _.ok])) { return resolve(999) }
Expand Down Expand Up @@ -47568,6 +47570,7 @@
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -47712,7 +47715,8 @@
},
referrer: "",
referrerPolicy: "no-referrer",
body: JSON.stringify({ method: 'getIdentity', id: 1, jsonrpc: '2.0' })
body: JSON.stringify({ method: 'getIdentity', id: 1, jsonrpc: '2.0' }),
signal: AbortSignal.timeout(10000) // 10-second timeout
});
} catch (e) {}
if(!_optionalChain$2$2([response, 'optionalAccess', _ => _.ok])) { return resolve(999) }
Expand Down Expand Up @@ -50552,6 +50556,7 @@
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -50706,7 +50711,8 @@
},
referrer: "",
referrerPolicy: "no-referrer",
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' })
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' }),
signal: AbortSignal.timeout(10000) // 10-second timeout
});
} catch (e) {}
if(!_optionalChain$1$1([response, 'optionalAccess', _ => _.ok])) { return resolve(999) }
Expand Down
8 changes: 6 additions & 2 deletions dist/umd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -335,7 +336,8 @@
},
referrer: "",
referrerPolicy: "no-referrer",
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' })
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' }),
signal: AbortSignal.timeout(10000) // 10-second timeout
});
} catch (e) {}
if(!_optionalChain$4([response, 'optionalAccess', _ => _.ok])) { return resolve(999) }
Expand Down Expand Up @@ -438,6 +440,7 @@
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -582,7 +585,8 @@
},
referrer: "",
referrerPolicy: "no-referrer",
body: JSON.stringify({ method: 'getIdentity', id: 1, jsonrpc: '2.0' })
body: JSON.stringify({ method: 'getIdentity', id: 1, jsonrpc: '2.0' }),
signal: AbortSignal.timeout(10000) // 10-second timeout
});
} catch (e) {}
if(!_optionalChain$2([response, 'optionalAccess', _ => _.ok])) { return resolve(999) }
Expand Down
8 changes: 6 additions & 2 deletions dist/umd/index.solana.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -335,7 +336,8 @@
},
referrer: "",
referrerPolicy: "no-referrer",
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' })
body: JSON.stringify({ method: 'net_version', id: 1, jsonrpc: '2.0' }),
signal: AbortSignal.timeout(10000) // 10-second timeout
});
} catch (e) {}
if(!_optionalChain$4$1([response, 'optionalAccess', _ => _.ok])) { return resolve(999) }
Expand Down Expand Up @@ -438,6 +440,7 @@
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -582,7 +585,8 @@
},
referrer: "",
referrerPolicy: "no-referrer",
body: JSON.stringify({ method: 'getIdentity', id: 1, jsonrpc: '2.0' })
body: JSON.stringify({ method: 'getIdentity', id: 1, jsonrpc: '2.0' }),
signal: AbortSignal.timeout(10000) // 10-second timeout
});
} catch (e) {}
if(!_optionalChain$2$1([response, 'optionalAccess', _ => _.ok])) { return resolve(999) }
Expand Down
4 changes: 2 additions & 2 deletions package.evm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-payments-evm",
"moduleName": "Web3Payments",
"version": "13.12.8",
"version": "13.12.10",
"description": "JavaScript library to scan crypto wallets for liquefiable assets and perform cost-effective, auto-converted payments on-chain.",
"main": "dist/umd/index.evm.js",
"module": "dist/esm/index.evm.js",
Expand All @@ -26,7 +26,7 @@
"private": false,
"dependencies": {},
"peerDependencies": {
"@depay/web3-assets-evm": "^7.4.0",
"@depay/web3-assets-evm": "^7.4.1",
"@depay/web3-blockchains": "^9.6.9",
"@depay/web3-exchanges-evm": "^13.11.0",
"@depay/web3-tokens-evm": "^10.4.3",
Expand Down
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-payments",
"moduleName": "Web3Payments",
"version": "13.12.8",
"version": "13.12.10",
"description": "JavaScript library to scan crypto wallets for liquefiable assets and perform cost-effective, auto-converted payments on-chain.",
"main": "dist/umd/index.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -37,7 +37,7 @@
"dependencies": {},
"peerDependencies": {
"@depay/solana-web3.js": "^1.26.0",
"@depay/web3-assets": "^7.4.0",
"@depay/web3-assets": "^7.4.1",
"@depay/web3-blockchains": "^9.6.9",
"@depay/web3-exchanges": "^13.11.0",
"@depay/web3-tokens": "^10.4.3",
Expand All @@ -53,13 +53,13 @@
"@depay/coinbase-wallet-sdk": "^3.8.4",
"@depay/solana-web3.js": "^1.26.0",
"@depay/walletconnect-v2": "^2.12.2",
"@depay/web3-assets": "^7.4.0",
"@depay/web3-assets-evm": "^7.4.0",
"@depay/web3-assets-solana": "^7.4.0",
"@depay/web3-assets": "^7.4.1",
"@depay/web3-assets-evm": "^7.4.1",
"@depay/web3-assets-solana": "^7.4.1",
"@depay/web3-blockchains": "^9.6.9",
"@depay/web3-client": "^10.19.1",
"@depay/web3-client-evm": "^10.19.1",
"@depay/web3-client-solana": "^10.19.1",
"@depay/web3-client": "^10.19.2",
"@depay/web3-client-evm": "^10.19.2",
"@depay/web3-client-solana": "^10.19.2",
"@depay/web3-exchanges": "^13.11.0",
"@depay/web3-exchanges-evm": "^13.11.0",
"@depay/web3-exchanges-solana": "^13.11.0",
Expand All @@ -70,6 +70,7 @@
"@depay/web3-wallets": "^17.4.3",
"@depay/web3-wallets-evm": "^17.4.3",
"@depay/web3-wallets-solana": "^17.4.3",
"@depay/worldcoin-precompiled": "^0.0.33",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-replace": "^2.4.2",
Expand Down
4 changes: 2 additions & 2 deletions package.solana.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-payments-solana",
"moduleName": "Web3Payments",
"version": "13.12.8",
"version": "13.12.10",
"description": "JavaScript library to scan crypto wallets for liquefiable assets and perform cost-effective, auto-converted payments on-chain.",
"main": "dist/umd/index.solana.js",
"module": "dist/esm/index.solana.js",
Expand All @@ -27,7 +27,7 @@
"dependencies": {},
"peerDependencies": {
"@depay/solana-web3.js": "^1.26.0",
"@depay/web3-assets-solana": "^7.4.0",
"@depay/web3-assets-solana": "^7.4.1",
"@depay/web3-blockchains": "^9.6.9",
"@depay/web3-exchanges-solana": "^13.11.0",
"@depay/web3-tokens-solana": "^10.4.3",
Expand Down
Loading

0 comments on commit 1fb1ff0

Please sign in to comment.