Skip to content

fix: include plasma in SUPPORTED_CHAINS#116

Merged
mwelche merged 1 commit into
mainfrom
mathieu/fix/plasma-supported-chains
Jul 1, 2026
Merged

fix: include plasma in SUPPORTED_CHAINS#116
mwelche merged 1 commit into
mainfrom
mathieu/fix/plasma-supported-chains

Conversation

@mwelche

@mwelche mwelche commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Problem

plasma is declared as a supported chain in three places — the SupportedChainId union (src/types.ts), NATIVE_SYMBOL_BY_CHAIN_ID, and isChainIdSupported (src/utils/index.ts) — but it is missing from SUPPORTED_CHAINS in src/constants.ts.

SUPPORTED_CHAINS is used in parseSwap to resolve the chain name when a transaction has reverted:

const chain = SUPPORTED_CHAINS.find((chain) => chain.id === chainId);
const message = `Unable to parse. Transaction ${hash} on ${chain?.name} has reverted.`;

For a reverted Plasma transaction this logs ... on undefined has reverted. even though the chain is otherwise fully supported.

Solution

Add plasma to SUPPORTED_CHAINS so the chain is declared consistently across all four references. plasma is already imported in constants.ts, so this is a one-line addition.

Validation

  • tsc --emitDeclarationOnly passes.

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d419e97) to head (07ec3f3).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #116   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          210       210           
  Branches        42        42           
=========================================
  Hits           210       210           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mwelche mwelche force-pushed the mathieu/fix/plasma-supported-chains branch from 084c517 to 9b53b5a Compare July 1, 2026 04:16
@mwelche mwelche self-assigned this Jul 1, 2026
@mwelche mwelche requested a review from cgero-eth July 1, 2026 04:23
Plasma was present in the SupportedChainId union, NATIVE_SYMBOL_BY_CHAIN_ID,
and isChainIdSupported, but missing from SUPPORTED_CHAINS. That list is used
to resolve the chain name when a transaction has reverted, so a reverted
Plasma transaction logged an "undefined" chain name. Add plasma to the list
to make the chain's declaration consistent across all four references.
@mwelche mwelche force-pushed the mathieu/fix/plasma-supported-chains branch from 9b53b5a to 07ec3f3 Compare July 1, 2026 18:13
@mwelche mwelche merged commit 71f70b9 into main Jul 1, 2026
3 checks passed
@mwelche mwelche deleted the mathieu/fix/plasma-supported-chains branch July 1, 2026 18:20
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