diff --git a/packages/sdk/src/nodes/supported/AssetHubPolkadot.test.ts b/packages/sdk/src/nodes/supported/AssetHubPolkadot.test.ts index 2c399f5c..1f700bf5 100644 --- a/packages/sdk/src/nodes/supported/AssetHubPolkadot.test.ts +++ b/packages/sdk/src/nodes/supported/AssetHubPolkadot.test.ts @@ -317,4 +317,10 @@ describe('AssetHubPolkadot', () => { includeFee: true }) }) + + describe('getProvider', () => { + it('should return correct provider', () => { + expect(assetHub.getProvider()).toBeTypeOf('string') + }) + }) }) diff --git a/packages/sdk/src/nodes/supported/AssetHubPolkadot.ts b/packages/sdk/src/nodes/supported/AssetHubPolkadot.ts index 307c9720..73f93dbb 100644 --- a/packages/sdk/src/nodes/supported/AssetHubPolkadot.ts +++ b/packages/sdk/src/nodes/supported/AssetHubPolkadot.ts @@ -33,7 +33,7 @@ import { generateAddressPayload } from '../../utils/generateAddressPayload' import { ETHEREUM_JUNCTION } from '../../const' import { createEthereumTokenLocation } from '../../utils/multiLocation/createEthereumTokenLocation' import { isForeignAsset } from '../../utils/assets' -import { getParaId } from '../config' +import { getNodeProviders, getParaId } from '../config' const createCustomXcmToBifrost = ( { api, address, scenario }: TPolkadotXCMTransferOptions, @@ -404,6 +404,11 @@ class AssetHubPolkadot return super.createCurrencySpec(amount, scenario, version, asset) } } + + getProvider(): string { + // Return the second WebSocket URL because the first one is sometimes unreliable. + return getNodeProviders(this.node)[1] + } } export default AssetHubPolkadot diff --git a/packages/sdk/src/nodes/supported/Hydration.test.ts b/packages/sdk/src/nodes/supported/Hydration.test.ts index 6825007c..00e52939 100644 --- a/packages/sdk/src/nodes/supported/Hydration.test.ts +++ b/packages/sdk/src/nodes/supported/Hydration.test.ts @@ -178,7 +178,7 @@ describe('Hydration', () => { describe('getProvider', () => { it('should return LiebiEU provider', () => { - expect(hydration.getProvider()).toBe('wss://rpc.helikon.io/hydradx') + expect(hydration.getProvider()).toBe('wss://hydradx.paras.ibp.network') }) }) }) diff --git a/packages/sdk/src/nodes/supported/Hydration.ts b/packages/sdk/src/nodes/supported/Hydration.ts index 1dd34f70..3ca7ce70 100644 --- a/packages/sdk/src/nodes/supported/Hydration.ts +++ b/packages/sdk/src/nodes/supported/Hydration.ts @@ -279,7 +279,7 @@ class Hydration getProvider(): string { // Return the second WebSocket URL because the first one is sometimes unreliable. - return getNodeProviders(this.node)[2] + return getNodeProviders(this.node)[3] } } diff --git a/packages/sdk/src/nodes/supported/Polimec.ts b/packages/sdk/src/nodes/supported/Polimec.ts index 5ca315f7..a00921e5 100644 --- a/packages/sdk/src/nodes/supported/Polimec.ts +++ b/packages/sdk/src/nodes/supported/Polimec.ts @@ -90,7 +90,7 @@ class Polimec extends ParachainNode implements IPolkadot } private getAssetMultiLocation = (asset: TAsset): TMultiLocation => { - if (!isForeignAsset(asset) && asset.symbol === 'DOT') { + if (asset.symbol === 'DOT') { return DOT_MULTILOCATION }