Skip to content

test(operation): decode pool-share change trust in byte issuer order - #1769

Open
Ryang-21 wants to merge 1 commit into
mainfrom
test/pool-share-decode-order
Open

Ryang-21 wants to merge 1 commit into
mainfrom
test/pool-share-decode-order

Conversation

@Ryang-21

@Ryang-21 Ryang-21 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

What

Adds a test that decodes a pool-share ChangeTrust with Operation.fromXdrObject(). Its two assets share a code, and their issuers sort one way by key bytes and the other way as strkey text.

Why

#1766 fixed Asset.compare(), but its tests call compare() directly. A user hit the bug through the decode path while indexing ledgers, so this covers that path. The test fails against the v17.2.0 asset.ts. The v16 backport (#1768) adds the same test.

Copilot AI lite review requested due to automatic review settings October 1, 2026 01:17

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Adds regression coverage for decoding a pool-share ChangeTrust with issuer ordering that differs between key bytes and StrKey text.

Changes:

  • Constructs the edge-case XDR operation.
  • Verifies both pool assets decode correctly.
File Description
test/​unit/​base/​operations/​change_trust.test.ts Adds the issuer-order decoding regression test.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog (Not Ready)

Development

Successfully merging this pull request may close these issues.

2 participants