Skip to content

Fix: xrpl remote deployment (2) ITS-135#711

Merged
dfapel merged 3 commits into
mainfrom
fix/xrpl-remote-deployment2
Nov 24, 2025
Merged

Fix: xrpl remote deployment (2) ITS-135#711
dfapel merged 3 commits into
mainfrom
fix/xrpl-remote-deployment2

Conversation

@dfapel

@dfapel dfapel commented Nov 21, 2025

Copy link
Copy Markdown
Contributor

Summary

The previous PR #709 incorrectly allowed users to make remote deployments to XRPL. This is fixed in this PR, i.e., the user should never see the option to make a remote deployment to XRPL.


Note

Filters out chains without remote deployment support (e.g., XRPL) from eligible destinations across deployment flows and token details.

  • Utils:
    • Add filterEligibleChainsForRemoteDeployment in lib/utils/chains.ts to filter CHAINS_WITHOUT_DEPLOYMENT after filterEligibleChains.
  • Deployment Flows:
    • Replace filterEligibleChains with filterEligibleChainsForRemoteDeployment in CanonicalTokenDeployment/.../DeployAndRegister.tsx and InterchainTokenDeployment/.../DeployAndRegister.tsx to hide non-deployable chains from ChainPicker.
  • Interchain Token Details:
    • Filter unregistered tokens by CHAINS_WITHOUT_DEPLOYMENT in ConnectedInterchainTokensPage.tsx to prevent showing unsupported chains.

Written by Cursor Bugbot for commit b0b2183. This will update automatically on new commits. Configure here.

@changeset-bot

changeset-bot Bot commented Nov 21, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b0b2183

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Nov 21, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
axelarjs-maestro-testnet Ready Ready Preview Comment Nov 21, 2025 9:42am
2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
axelar-registry Ignored Ignored Nov 21, 2025 9:42am
axelar-ui Ignored Ignored Nov 21, 2025 9:42am

@greptile-apps

greptile-apps Bot commented Nov 21, 2025

Copy link
Copy Markdown

Greptile Overview

Greptile Summary

This PR correctly fixes the issue introduced in PR #709 by separating chain filtering concerns into two distinct functions.

Key Changes:

  • Created new filterEligibleChainsForRemoteDeployment() function that explicitly excludes chains in CHAINS_WITHOUT_DEPLOYMENT (XRPL)
  • Updated deployment components to use the new function for remote deployments
  • Reverted let to const in ConnectedInterchainTokensPage.tsx following best practices (rule 587aa4bd)
  • Maintains filtering of unregistered tokens to exclude non-deployable chains

Why This Approach is Correct:
The previous PR (#709) removed the global exclusion from filterEligibleChains() but only added it to one location. This PR properly separates concerns:

  1. filterEligibleChains() - General chain eligibility for ITS transfers (used in hooks.ts to show registered tokens, including XRPL if already deployed)
  2. filterEligibleChainsForRemoteDeployment() - Specific filtering for remote deployments (excludes XRPL entirely)

This ensures users can view registered XRPL tokens but cannot attempt new remote deployments to XRPL.

Confidence Score: 5/5

  • This PR is safe to merge - it properly fixes the XRPL remote deployment issue with a clean architectural solution
  • The implementation correctly separates chain filtering concerns, follows coding best practices (using const instead of let), and maintains backward compatibility. The new function is properly named and documented, and all deployment components are consistently updated.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
apps/maestro/src/lib/utils/chains.ts 5/5 Adds new filterEligibleChainsForRemoteDeployment function that properly separates remote deployment logic from general chain filtering
apps/maestro/src/ui/pages/InterchainTokenDetailsPage/ConnectedInterchainTokensPage.tsx 5/5 Correctly reverts from let to const declaration and maintains filtering of unregistered tokens to exclude chains without deployment
apps/maestro/src/features/CanonicalTokenDeployment/steps/deploy-and-register/DeployAndRegister.tsx 5/5 Updates import and usage to use new filterEligibleChainsForRemoteDeployment function for proper deployment filtering
apps/maestro/src/features/InterchainTokenDeployment/steps/deploy-and-register/DeployAndRegister.tsx 5/5 Updates import and usage to use new filterEligibleChainsForRemoteDeployment function for proper deployment filtering

Sequence Diagram

sequenceDiagram
    participant User
    participant DeployComponent as Deploy Component
    participant FilterRemote as filterEligibleChainsForRemoteDeployment()
    participant FilterBase as filterEligibleChains()
    participant TokenDetailsPage as InterchainTokenDetailsPage
    
    User->>DeployComponent: Select remote deployment chains
    DeployComponent->>FilterRemote: Get eligible chains for deployment
    FilterRemote->>FilterBase: Get eligible chains for ITS transfers
    FilterBase-->>FilterRemote: Return eligible chains (VM type, whitelisted)
    FilterRemote->>FilterRemote: Filter out CHAINS_WITHOUT_DEPLOYMENT (XRPL)
    FilterRemote-->>DeployComponent: Return deployable chains only
    DeployComponent-->>User: Show only deployable chains
    
    User->>TokenDetailsPage: View registered tokens
    TokenDetailsPage->>TokenDetailsPage: Split tokens into registered/unregistered
    TokenDetailsPage->>TokenDetailsPage: Filter unregistered to exclude CHAINS_WITHOUT_DEPLOYMENT
    TokenDetailsPage-->>User: Show registered tokens (including XRPL if registered)
    TokenDetailsPage-->>User: Show unregistered tokens (excluding XRPL)
Loading

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@joaoazevedo joaoazevedo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dfapel dfapel changed the title Fix: xrpl remote deployment (2) Fix: xrpl remote deployment (2) ITS-135 Nov 24, 2025
@linear

linear Bot commented Nov 24, 2025

Copy link
Copy Markdown

ITS-135

@dfapel dfapel merged commit 07d3c5b into main Nov 24, 2025
7 of 8 checks passed
@dfapel dfapel deleted the fix/xrpl-remote-deployment2 branch November 24, 2025 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants