Skip to content

fix: remove Mantle #11512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2025
Merged

fix: remove Mantle #11512

merged 1 commit into from
Apr 6, 2025

Conversation

Jarsen136
Copy link
Contributor

@Jarsen136 Jarsen136 commented Apr 5, 2025

Thank you for your contribution to the Koda - Generative Art Marketplace.

👇 __ Let's make a quick check before the contribution.

PR Type

  • Bugfix

Needs QA check

  • @kodadot/qa-guild please review

Context

Screenshot 📸

  • My fix has changed something on UI; a screenshot is best to understand changes for others.
    image

Summary by CodeRabbit

  • Refactor
    • Removed support for the Mantle chain from the platform.
    • Updated network configurations, endpoints, and asset displays to exclude Mantle—streamlining chain selection and reducing interface clutter.
    • Improved features such as explorer links, token price tracking, and wallet management by limiting options to currently supported networks.
    • This update enhances overall system clarity and stability by focusing solely on active network integrations.

@Jarsen136 Jarsen136 requested a review from a team as a code owner April 5, 2025 17:04
@Jarsen136 Jarsen136 requested review from preschian and vikiival and removed request for a team April 5, 2025 17:04
Copy link

coderabbitai bot commented Apr 5, 2025

Walkthrough

This pull request removes all references and support for the "mnt" (mantle) chain across the codebase. Changes span composables, libraries, plugins, stores, and utility modules by deleting mappings, configuration entries, endpoints, type definitions, and related properties for "mnt"/mantle. No new public entities were introduced; instead, existing ones have been pruned to exclude mantle data. These modifications align the code with the objective of hiding mantle from the chain selector and related functionalities.

Changes

File(s) Change Summary
composables/useIcon.ts
composables/useMultipleBalance.ts
Removed "mnt" case from icon selection and eliminated mantle references from balance mappings.
libs/static/src/chains.ts
libs/static/src/endpoints.ts
libs/static/src/indexers.ts
libs/static/src/names.ts
libs/static/src/services.ts
libs/static/src/types.ts
Deleted mantle ("mnt") entries from chain configurations, endpoints, indexers, names, explorers, and type definitions.
plugins/wagmi.client.ts Removed mantle from import and configuration; the chains array now only includes base.
stores/fiat.ts
stores/identity.ts
Eliminated mantle token/chain references from state definitions, fiat pricing logic, and identity mappings.
utils/coinprice.ts
utils/teleport.ts
utils/viem.ts
Stripped out mantle-related tokens, chain enum entries, mappings, and utility references.

Assessment against linked issues

Objective Addressed Explanation
Hide Immutable ZKEVM and Mantle from chain selector (#11511)

Poem

I'm a bunny on the run,
Hopping through code under the sun,
Mantle's shadow fades into the light,
Clearing paths for chains so bright.
With each line, my whiskers twitch in glee 🐇🥕,
Celebrating a leaner, simpler spree!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b3f76fc and 80ce8d8.

⛔ Files ignored due to path filters (2)
  • public/chain/mnt.svg is excluded by !**/*.svg
  • public/chain/mnt_dark.svg is excluded by !**/*.svg
📒 Files selected for processing (14)
  • composables/useIcon.ts (0 hunks)
  • composables/useMultipleBalance.ts (0 hunks)
  • libs/static/src/chains.ts (0 hunks)
  • libs/static/src/endpoints.ts (0 hunks)
  • libs/static/src/indexers.ts (0 hunks)
  • libs/static/src/names.ts (0 hunks)
  • libs/static/src/services.ts (0 hunks)
  • libs/static/src/types.ts (1 hunks)
  • plugins/wagmi.client.ts (2 hunks)
  • stores/fiat.ts (1 hunks)
  • stores/identity.ts (1 hunks)
  • utils/coinprice.ts (1 hunks)
  • utils/teleport.ts (1 hunks)
  • utils/viem.ts (1 hunks)
💤 Files with no reviewable changes (7)
  • composables/useIcon.ts
  • libs/static/src/names.ts
  • libs/static/src/chains.ts
  • composables/useMultipleBalance.ts
  • libs/static/src/services.ts
  • libs/static/src/endpoints.ts
  • libs/static/src/indexers.ts
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: shard (1, 10)
  • GitHub Check: shard (7, 10)
  • GitHub Check: shard (6, 10)
  • GitHub Check: shard (3, 10)
  • GitHub Check: shard (5, 10)
  • GitHub Check: shard (4, 10)
  • GitHub Check: shard (10, 10)
  • GitHub Check: shard (2, 10)
🔇 Additional comments (14)
libs/static/src/types.ts (1)

1-1: Correctly removed 'mnt' from Prefix type.

This change aligns with the PR objective to remove Mantle support from the codebase. The Prefix type is now correctly updated to exclude 'mnt' from the valid values.

utils/viem.ts (3)

2-2: Import statement correctly updated.

The mantle import has been properly removed from the import statement, which aligns with the PR objective to remove Mantle support.


5-7: CHAIN_ID_TO_PREFIX mapping correctly updated.

The mapping for Mantle's chain ID has been properly removed from the CHAIN_ID_TO_PREFIX object, ensuring the application no longer maps any chain ID to the 'mnt' prefix.


9-11: PREFIX_TO_CHAIN mapping correctly updated.

The entry for 'mnt' has been properly removed from the PREFIX_TO_CHAIN object, ensuring the application no longer maps the 'mnt' prefix to the Mantle chain.

plugins/wagmi.client.ts (2)

3-3: Import statement correctly updated.

The mantle import has been properly removed from the import statement, which aligns with the PR objective to remove Mantle support.


16-16: Wagmi configuration correctly updated.

The Mantle chain has been properly removed from the chains array in the Wagmi configuration, ensuring the application no longer connects to the Mantle chain.

stores/identity.ts (4)

9-18: DEFAULT_BALANCE_STATE correctly updated.

The 'mnt' entry has been properly removed from the DEFAULT_BALANCE_STATE object, ensuring the application no longer tracks balances for the Mantle chain.


27-33: ChainType correctly updated.

The 'mantle' type has been properly removed from the ChainType definition, ensuring the application no longer recognizes Mantle as a valid chain type.


42-42: ChainToken type correctly updated.

The 'mnt' token has been properly removed from the ChainToken type, ensuring the application no longer tracks token balances for Mantle.


97-103: multiBalanceAssets array correctly updated.

The entry for the Mantle chain has been properly removed from the multiBalanceAssets array, ensuring the application no longer attempts to fetch balances for Mantle.

stores/fiat.ts (1)

57-57: Correctly removed Mantle from token list for fiat price fetching

This change aligns with the PR objective to remove Mantle from the codebase by removing 'mantle' from the list of tokens for which fiat prices are fetched.

utils/coinprice.ts (1)

63-64: Type definitions updated correctly to remove Mantle

The Token and TokenName type definitions have been properly updated to remove 'MNT' and 'mantle' respectively, which is consistent with the PR objective of removing Mantle support.

utils/teleport.ts (2)

118-118: Currency type correctly updated to remove Mantle

The Currency type has been properly updated to remove 'MNT', which is consistent with the PR objective of removing Mantle support.


131-137: Precision mapping updated correctly

The chainToPrecisionMap has been properly updated to remove the Chain.MANTLE entry, which is consistent with the PR objective.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

netlify bot commented Apr 5, 2025

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit 80ce8d8
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/67f162908c53200008ddb4a9
😎 Deploy Preview https://deploy-preview-11512--koda-canary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

sonarqubecloud bot commented Apr 5, 2025

@Jarsen136 Jarsen136 added this pull request to the merge queue Apr 6, 2025
Merged via the queue into kodadot:main with commit d234409 Apr 6, 2025
26 of 27 checks passed
@Jarsen136 Jarsen136 deleted the issue-11511 branch April 6, 2025 17:06
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.

Hide Immutable ZKEVM and Mantle from chain selector
3 participants