Skip to content

fix: update return types and handle null values in PaygQueryService and PaygService#639

Merged
icezohu merged 4 commits intomainfrom
fix-channel-last-final
Feb 13, 2026
Merged

fix: update return types and handle null values in PaygQueryService and PaygService#639
icezohu merged 4 commits intomainfrom
fix-channel-last-final

Conversation

@icezohu
Copy link
Collaborator

@icezohu icezohu commented Feb 12, 2026

Summary by CodeRabbit

  • Version Update

    • Release version 2.10.5
  • Bug Fixes

    • Improved state-channel synchronization with clearer handling of “not found” vs request-failure outcomes.
    • Better null/undefined semantics to reduce ambiguous results and edge-case errors.
  • Chores

    • Project CLI entry simplified and project runtime pinned to Node 20.19.0 and Yarn 1.22.22 (tooling/version configuration).

@coderabbitai
Copy link

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

Bumps indexer-coordinator to 2.10.5, changes the package bin declaration to a string, adds Volta pinning (Node 20.19.0, Yarn 1.22.22), and updates PAYG methods to distinguish null (not found) from undefined (request failure), adjusting deletion and call-site behavior accordingly.

Changes

Cohort / File(s) Summary
Indexer coordinator package metadata
apps/indexer-coordinator/package.json
Version updated from 2.10.4 to 2.10.5; bin changed from object mapping to string ("./bin/run"); added volta block with Node 20.19.0 and Yarn 1.22.22.
Top-level Volta config
package.json
Added volta configuration specifying Node 20.19.0 and Yarn 1.22.22.
PAYG query service
apps/indexer-coordinator/src/payg/payg.query.service.ts
getStateChannel return type widened to `StateChannel
PAYG service
apps/indexer-coordinator/src/payg/payg.service.ts
Signatures updated to accept `StateChannelOnNetwork

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through code with careful paws,
null says "gone" while undefined withdraws,
Versions climbed and Volta set the scene,
Bin paths tidy and types kept lean,
A rabbit cheers — the repo's serene! 🥕

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 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 changes in the PR: updating return types in PaygQueryService and PaygService to handle null values more explicitly.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

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

✨ 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 fix-channel-last-final

No actionable comments were generated in the recent review. 🎉


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.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@apps/indexer-coordinator/src/payg/payg.service.ts`:
- Around line 174-188: The updateChannelFromNetwork function treats null as
falsy and re-fetches the channel, losing the explicit "not found" signal; change
the guard that currently reads if (!altChannelData) so it only triggers a
network fetch when altChannelData === undefined (i.e., check for undefined
explicitly), leaving altChannelData === null untouched so the "not found" case
is honored and deletion logic can run; update references in
updateChannelFromNetwork to use this strict undefined check.

@icezohu icezohu merged commit 7e1a883 into main Feb 13, 2026
3 checks passed
@icezohu icezohu deleted the fix-channel-last-final branch February 13, 2026 08:08
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