Skip to content

Commit f323dc9

Browse files
authored
fix: xrpl remote deployments issue (#709)
1 parent b2eccfa commit f323dc9

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

apps/maestro/src/lib/utils/chains.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { CHAINS_WITHOUT_DEPLOYMENT } from "~/config/chains";
21
import { NEXT_PUBLIC_WHITELISTED_DEST_CHAINS_FOR_VM } from "~/config/env";
32
import { ITSChainConfig } from "~/server/chainConfig";
43

@@ -33,8 +32,6 @@ export const filterEligibleChains = (
3332
const isAllChainsWhitelisted = whitelistedChains[0] === "all";
3433

3534
return destinationChains.filter((chain) => {
36-
if (CHAINS_WITHOUT_DEPLOYMENT.includes(chain.chain_id))
37-
return false;
3835
const isOriginChainSameAsDestinationChain =
3936
chain.chain_id === currentChainId;
4037
const areDifferentChainTypes = chain.chain_type !== currentChain.chain_type;

apps/maestro/src/ui/pages/InterchainTokenDetailsPage/ConnectedInterchainTokensPage.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { useSession } from "next-auth/react";
88
import { concat, isEmpty, map, partition, uniq, without } from "rambda";
99

1010
import {
11+
CHAINS_WITHOUT_DEPLOYMENT,
1112
EVM_CHAIN_IDS_WITH_NON_DETERMINISTIC_TOKEN_ADDRESS,
1213
SUI_CHAIN_ID,
1314
} from "~/config/chains";
@@ -403,7 +404,8 @@ const ConnectedInterchainTokensPage: FC<ConnectedInterchainTokensPageProps> = (
403404
tokenAddress: props.tokenAddress,
404405
});
405406

406-
const [registered, unregistered] = Maybe.of(interchainToken?.matchingTokens)
407+
// eslint-disable-next-line prefer-const
408+
let [registered, unregistered] = Maybe.of(interchainToken?.matchingTokens)
407409
.map(
408410
map(
409411
(token) =>
@@ -420,6 +422,10 @@ const ConnectedInterchainTokensPage: FC<ConnectedInterchainTokensPageProps> = (
420422
partition((x) => x.isRegistered)
421423
);
422424

425+
// There are some chains where we cannot remote deploy to
426+
// Thus, we need to remove these chains from the `unregistered` object.
427+
unregistered = unregistered.filter((token) => !(CHAINS_WITHOUT_DEPLOYMENT.includes(token.chainId)));
428+
423429
const destinationChainIds = useMemo(
424430
() =>
425431
sessionState.selectedChainIds

0 commit comments

Comments
 (0)