Skip to content

fix: billing topup fix#71

Merged
sqhell merged 2 commits into
mainfrom
fix/billing-topup-api-fix
Apr 24, 2026
Merged

fix: billing topup fix#71
sqhell merged 2 commits into
mainfrom
fix/billing-topup-api-fix

Conversation

@sqhell
Copy link
Copy Markdown
Contributor

@sqhell sqhell commented Apr 24, 2026

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request reduces the default page_size from 1000 to 100 in the _query_active_contracts_via_updates function to comply with Canton JSON API limits. Review feedback identifies a critical flaw in the pagination logic where the loop may terminate prematurely if a page contains only non-transaction updates, such as checkpoints. Additionally, the implementation's assumption that offsets are integers starting from zero is problematic, as offsets should be treated as opaque strings provided by the API to ensure compatibility across different environments.

Comment thread src/canton_mcp_server/canton_billing.py
@sqhell sqhell merged commit 5d76710 into main Apr 24, 2026
1 check passed
@sqhell sqhell deleted the fix/billing-topup-api-fix branch April 24, 2026 02:30
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