Skip to content

Commit

Permalink
fix: Fix WS endpoints timing out
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldev5 authored and dudo50 committed Jun 23, 2024
1 parent 678eb6a commit 32f34b8
Show file tree
Hide file tree
Showing 5 changed files with 269 additions and 22 deletions.
2 changes: 1 addition & 1 deletion apps/xcm-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@paraspell/xcm-router": "workspace:*",
"@polkadot/api": "^11.2.1",
"@polkadot/api-base": "^11.2.1",
"@polkadot/apps-config": "^0.138.1",
"@polkadot/apps-config": "^0.139.1",
"@polkadot/keyring": "^12.5.1",
"@polkadot/types": "^11.2.1",
"@polkadot/util": "^12.6.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"peerDependencies": {
"@polkadot/api": "^11.2.1",
"@polkadot/api-base": "^11.2.1",
"@polkadot/apps-config": "^0.138.1",
"@polkadot/apps-config": "^0.139.1",
"@polkadot/types": "^11.2.1",
"@polkadot/util": "^12.6.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export const createApiInstance = async (wsUrl: string): Promise<ApiPromise> => {
export const createApiInstanceForNode = async (node: TNodeWithRelayChains): Promise<ApiPromise> => {
if (node === 'Polkadot' || node === 'Kusama') {
const endpointOption = node === 'Polkadot' ? prodRelayPolkadot : prodRelayKusama
const wsUrl = Object.values(endpointOption.providers)[1]
const wsUrl = Object.values(endpointOption.providers)[0]
return await createApiInstance(wsUrl)
}
return await getNode(node).createApiInstance()
Expand Down
2 changes: 1 addition & 1 deletion packages/xcm-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@paraspell/sdk": "workspace:*",
"@polkadot/api": "^11.2.1",
"@polkadot/api-base": "^11.2.1",
"@polkadot/apps-config": "^0.138.1",
"@polkadot/apps-config": "^0.139.1",
"@polkadot/types": "^11.2.1",
"@polkadot/types-codec": "^11.2.1",
"@polkadot/util": "^12.6.2",
Expand Down
Loading

0 comments on commit 32f34b8

Please sign in to comment.