Skip to content

Commit

Permalink
hotfix: disabled XCM for Polkadot and relaychain (#1347)
Browse files Browse the repository at this point in the history
  • Loading branch information
impelcrypto authored Jul 2, 2024
1 parent f619d10 commit 7c92cce
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/hooks/xcm/useTransferRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export type TransferMode = 'local' | 'xcm';
export const astarNetworks = ['astar', 'shiden', 'shibuya'];
export const astarNativeTokens = ['sdn', 'astr', 'sby'];
// e.g.: endpointKey.SHIDEN;
const disabledXcmChain: endpointKey | undefined = endpointKey.SHIDEN;
const disabledXcmChains: endpointKey[] | undefined = [endpointKey.SHIDEN, endpointKey.ASTAR];

export interface NetworkFromTo {
from: string;
Expand Down Expand Up @@ -376,7 +376,9 @@ export function useTransferRouter() {
return false;
}

const isDisabledXcmChain = disabledXcmChain === currentNetworkIdx.value;
const isDisabledXcmChain = Boolean(
disabledXcmChains && disabledXcmChains.find((it) => it === currentNetworkIdx.value)
);
const originChain = token.value?.originChain || '';
return checkIsDisabledToken(originChain) || isDisabledXcmChain;
});
Expand Down

0 comments on commit 7c92cce

Please sign in to comment.