Skip to content

chore: bump tx3 to v0.15.1#917

Merged
scarmuega merged 2 commits intomainfrom
chore/tx3-0151
Feb 25, 2026
Merged

chore: bump tx3 to v0.15.1#917
scarmuega merged 2 commits intomainfrom
chore/tx3-0151

Conversation

@scarmuega
Copy link
Member

@scarmuega scarmuega commented Feb 25, 2026

Summary by CodeRabbit

  • Chores

    • Updated tx3-cardano and tx3-resolver dependencies to v0.15.1.
  • Refactor

    • Consolidated TRP endpoint parameter handling for clearer, consistent request fields.
  • Bug Fix / API

    • Standardized JSON request field naming (e.g., includePayload) for relevant TRP endpoints; tests updated accordingly.

@coderabbitai
Copy link

coderabbitai bot commented Feb 25, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5256786 and d1dee00.

📒 Files selected for processing (1)
  • crates/trp/src/methods.rs

📝 Walkthrough

Walkthrough

Dependencies bumped in crates/trp/Cargo.toml (tx3-cardano, tx3-resolver 0.15.0→0.15.1). Consolidated parameter structs in crates/trp/src/methods.rs: added DumpLogsParams, PeekPendingParams, PeekInflightParams with serde rename mapping for includePayloadinclude_payload. No control-flow changes.

Changes

Cohort / File(s) Summary
Dependency Updates
crates/trp/Cargo.toml
Bumped tx3-cardano and tx3-resolver from 0.15.00.15.1.
Parameter Consolidation
crates/trp/src/methods.rs
Added three new parameter structs: DumpLogsParams, PeekPendingParams, PeekInflightParams. Added serde rename mapping for includePayloadinclude_payload. Removed adjacent duplicate parameter-struct definitions and updated tests to use the renamed JSON field. No other logic changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Versions hopped up, tidy and bright,
New structs gathered, snug and right,
Serde whispers names anew,
Fields align — a cleaner view,
I nibble bugs away, delight! 🥕

🚥 Pre-merge checks | ✅ 3
✅ 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 'chore: bump tx3 to v0.15.1' accurately describes the primary change in the PR - a dependency version bump. However, the changeset also includes structural improvements to parameter-struct definitions in methods.rs with serde field renaming, which is not reflected in the title.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/tx3-0151

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

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/trp/src/methods.rs (1)

499-506: ⚠️ Potential issue | 🔴 Critical

Test will fail: wrong JSON key for the includePayload field.

Line 500 sends "include_payload" (snake_case) as the JSON key, but PeekPendingParams maps the field via #[serde(rename = "includePayload")]. Without #[serde(deny_unknown_fields)], serde silently discards the unrecognised key, leaving include_payload as Nonefalse. The assertion on line 506 that all payloads are Some therefore fails.

🐛 Proposed fix
-        let req = json!({ "include_payload": true }).to_string();
+        let req = json!({ "includePayload": true }).to_string();
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/trp/src/methods.rs` around lines 499 - 506, The test is using the
wrong JSON key name for PeekPendingParams' includePayload field; update the
request payload sent to trp_peek_pending to use the exact serde name
"includePayload" (not "include_payload") so PeekPendingParams (used by
trp_peek_pending) receives includePayload=true and payloads are returned; locate
the test block around trp_peek_pending, change the JSON key to "includePayload"
when building req/Params, then re-run the test.
🧹 Nitpick comments (1)
crates/trp/src/methods.rs (1)

121-135: PeekPendingParams and PeekInflightParams are structurally identical — consider deduplicating.

Both structs have the same two fields (limit: Option<usize>, include_payload: Option<bool>). A single shared struct (e.g., PeekParams) can serve both handlers.

♻️ Proposed refactor
-// ── trp.peekPending ─────────────────────────────────────────────────────
-
-#[derive(Deserialize)]
-struct PeekPendingParams {
-    limit: Option<usize>,
-    #[serde(rename = "includePayload")]
-    include_payload: Option<bool>,
-}
-
-// ── trp.peekInflight ────────────────────────────────────────────────────
-
-#[derive(Deserialize)]
-struct PeekInflightParams {
-    limit: Option<usize>,
-    #[serde(rename = "includePayload")]
-    include_payload: Option<bool>,
-}
+// ── trp.peekPending / trp.peekInflight ──────────────────────────────────
+
+#[derive(Deserialize)]
+struct PeekParams {
+    limit: Option<usize>,
+    #[serde(rename = "includePayload")]
+    include_payload: Option<bool>,
+}

Then update both handlers to use PeekParams:

-    let params: PeekPendingParams = params.parse()?;
+    let params: PeekParams = params.parse()?;
-    let params: PeekInflightParams = params.parse()?;
+    let params: PeekParams = params.parse()?;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/trp/src/methods.rs` around lines 121 - 135, The two structs
PeekPendingParams and PeekInflightParams are identical; replace them with a
single shared struct PeekParams containing limit: Option<usize> and
#[serde(rename = "includePayload")] include_payload: Option<bool>, then update
all places that referenced PeekPendingParams or PeekInflightParams (e.g., the
peek-pending and peek-inflight handlers) to use PeekParams instead; keep the
serde rename on include_payload so JSON compatibility is preserved.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@crates/trp/src/methods.rs`:
- Around line 499-506: The test is using the wrong JSON key name for
PeekPendingParams' includePayload field; update the request payload sent to
trp_peek_pending to use the exact serde name "includePayload" (not
"include_payload") so PeekPendingParams (used by trp_peek_pending) receives
includePayload=true and payloads are returned; locate the test block around
trp_peek_pending, change the JSON key to "includePayload" when building
req/Params, then re-run the test.

---

Nitpick comments:
In `@crates/trp/src/methods.rs`:
- Around line 121-135: The two structs PeekPendingParams and PeekInflightParams
are identical; replace them with a single shared struct PeekParams containing
limit: Option<usize> and #[serde(rename = "includePayload")] include_payload:
Option<bool>, then update all places that referenced PeekPendingParams or
PeekInflightParams (e.g., the peek-pending and peek-inflight handlers) to use
PeekParams instead; keep the serde rename on include_payload so JSON
compatibility is preserved.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d1a1182 and 5256786.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • crates/trp/Cargo.toml
  • crates/trp/src/methods.rs

@scarmuega scarmuega merged commit 68bbe0c into main Feb 25, 2026
11 checks passed
@scarmuega scarmuega deleted the chore/tx3-0151 branch February 25, 2026 11:50
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.

1 participant