Skip to content

Commit

Permalink
v10.19.3: increase solana default time to 60
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 committed Oct 26, 2024
1 parent d90a737 commit a8bf133
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ class StaticJsonRpcSequentialProvider extends Connection {
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
signal: AbortSignal.timeout(60000) // 60-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -989,7 +989,7 @@ var requestSolana = async ({ blockchain, address, api, method, params, block, ti
})
});

const timeoutPromise = new Promise((_, reject)=>setTimeout(()=>{ reject(new Error("Web3ClientTimeout")); }, timeout || 10000));
const timeoutPromise = new Promise((_, reject)=>setTimeout(()=>{ reject(new Error("Web3ClientTimeout")); }, timeout || 60000)); // 60s default timeout

allRequestsFailed = Promise.all(allRequestsFailed.map((request)=>{
return new Promise((resolve)=>{ request.catch(resolve); })
Expand Down
4 changes: 2 additions & 2 deletions dist/esm/index.solana.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class StaticJsonRpcSequentialProvider extends Connection {
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
signal: AbortSignal.timeout(60000) // 60-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -618,7 +618,7 @@ var requestSolana = async ({ blockchain, address, api, method, params, block, ti
})
});

const timeoutPromise = new Promise((_, reject)=>setTimeout(()=>{ reject(new Error("Web3ClientTimeout")); }, timeout || 10000));
const timeoutPromise = new Promise((_, reject)=>setTimeout(()=>{ reject(new Error("Web3ClientTimeout")); }, timeout || 60000)); // 60s default timeout

allRequestsFailed = Promise.all(allRequestsFailed.map((request)=>{
return new Promise((resolve)=>{ request.catch(resolve); })
Expand Down
4 changes: 2 additions & 2 deletions dist/umd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
signal: AbortSignal.timeout(60000) // 60-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -995,7 +995,7 @@
})
});

const timeoutPromise = new Promise((_, reject)=>setTimeout(()=>{ reject(new Error("Web3ClientTimeout")); }, timeout || 10000));
const timeoutPromise = new Promise((_, reject)=>setTimeout(()=>{ reject(new Error("Web3ClientTimeout")); }, timeout || 60000)); // 60s default timeout

allRequestsFailed = Promise.all(allRequestsFailed.map((request)=>{
return new Promise((resolve)=>{ request.catch(resolve); })
Expand Down
4 changes: 2 additions & 2 deletions dist/umd/index.solana.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
signal: AbortSignal.timeout(60000) // 60-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down Expand Up @@ -624,7 +624,7 @@
})
});

const timeoutPromise = new Promise((_, reject)=>setTimeout(()=>{ reject(new Error("Web3ClientTimeout")); }, timeout || 10000));
const timeoutPromise = new Promise((_, reject)=>setTimeout(()=>{ reject(new Error("Web3ClientTimeout")); }, timeout || 60000)); // 60s default timeout

allRequestsFailed = Promise.all(allRequestsFailed.map((request)=>{
return new Promise((resolve)=>{ request.catch(resolve); })
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.2",
"version": "10.19.3",
"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.2",
"version": "10.19.3",
"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.2",
"version": "10.19.3",
"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
2 changes: 1 addition & 1 deletion src/clients/solana/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class StaticJsonRpcSequentialProvider extends Connection {
method: 'POST',
body: JSON.stringify(batch),
headers: { 'Content-Type': 'application/json' },
signal: AbortSignal.timeout(10000) // 10-second timeout
signal: AbortSignal.timeout(60000) // 60-second timeout
}
).then((response)=>{
if(response.ok) {
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/solana/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default async ({ blockchain, address, api, method, params, block, timeout
})
})

const timeoutPromise = new Promise((_, reject)=>setTimeout(()=>{ reject(new Error("Web3ClientTimeout")) }, timeout || 10000))
const timeoutPromise = new Promise((_, reject)=>setTimeout(()=>{ reject(new Error("Web3ClientTimeout")) }, timeout || 60000)) // 60s default timeout

allRequestsFailed = Promise.all(allRequestsFailed.map((request)=>{
return new Promise((resolve)=>{ request.catch(resolve) })
Expand Down

0 comments on commit a8bf133

Please sign in to comment.