Skip to content

Conversation

@Thorian1te
Copy link
Collaborator

@Thorian1te Thorian1te commented Nov 27, 2025

Summary by CodeRabbit

  • New Features
    • Added TradeAsset to the supported asset types, expanding the range of compatible assets in the mayachain-query package.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 27, 2025

📝 Walkthrough

Walkthrough

This PR introduces a changeset entry for a patch release of @xchainjs/xchain-mayachain-query and extends the CompatibleAsset type union to include TradeAsset alongside existing Asset, TokenAsset, and SynthAsset types.

Changes

Cohort / File(s) Summary
Changeset
.changeset/wise-rocks-peel.md
New changeset entry marking a patch release for @xchainjs/xchain-mayachain-query
Type Definitions
packages/xchain-mayachain-query/src/types.ts
Extended CompatibleAsset type union to include TradeAsset as an additional compatible asset type

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • Maya trade accounts #1509: Adds TradeAsset type definitions and trade-related methods to xchain-mayachain-query, complementing this PR's expansion of the CompatibleAsset type union.

Suggested reviewers

  • underthesun49

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding the TradeAsset type to the CompatibleAsset union, which is the core modification across the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/update-mayachain-tradeAsset-types

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.changeset/wise-rocks-peel.md (1)

1-5: Align changeset wording (and double‑check semver level)

The changeset correctly targets @xchainjs/xchain-mayachain-query, but you might want to mirror the actual alias name for clarity:

-Add type TradeAsset to Compatible Asset types
+Add type TradeAsset to the `CompatibleAsset` union

Also, since this widens a public union type, it can introduce new TypeScript compile‑time errors for consumers that use exhaustive checks over CompatibleAsset. If your project’s policy treats that as non‑breaking, patch is fine; otherwise consider whether minor would better match your semver conventions.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0b47704 and 05f7fa1.

📒 Files selected for processing (2)
  • .changeset/wise-rocks-peel.md (1 hunks)
  • packages/xchain-mayachain-query/src/types.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
packages/xchain-mayachain-query/src/types.ts (1)
packages/xchain-util/src/types/asset.ts (4)
  • Asset (27-32)
  • TokenAsset (37-42)
  • SynthAsset (47-52)
  • TradeAsset (57-62)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (1)
packages/xchain-mayachain-query/src/types.ts (1)

15-15: Extending CompatibleAsset with TradeAsset is consistent and type-safe

Including TradeAsset in CompatibleAsset aligns with the rest of this file (trade-related types) and @xchainjs/xchain-util’s asset family, so the change looks correct and should let swap/fees/history handling accept trade assets where appropriate.

One thing to keep in mind: widening a public union type can surface new TypeScript compile errors for consumers that rely on exhaustive asset.type checks (e.g. assertNever patterns). If your semver policy treats that as non‑breaking, this is fine as a patch; otherwise, you may want to confirm that a minor bump is acceptable for downstreams.

@Thorian1te Thorian1te merged commit 8df7c54 into master Nov 28, 2025
3 checks passed
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.

3 participants