Repository navigation
fix: migrate balance and nonce api calls from v1 to v3 - #1879
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
rafa-stacks
marked this pull request as ready for review
August 24, 2026 16:05
rafa-stacks
requested review from
jannik-stacks
and
a balanced review from Copilot
August 24, 2026 16:05
There was a problem hiding this comment.
Pull request overview
Migrates deprecated balance and nonce API calls from v1 to v3 across the SDK.
Changes:
- Updates nonce fetching to use the v3 principal endpoint.
- Migrates STX balance responses and bigint conversions to the v3 shape.
- Updates CLI consumers, tests, documentation, and release metadata.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
packages/transactions/tests/builder.test.ts |
Updates the nonce response fixture. |
packages/transactions/src/fetch.ts |
Migrates nonce fetching to v3. |
packages/stacking/src/index.ts |
Migrates balances and response types to v3. |
packages/stacking/README.md |
Documents the new balance shape. |
packages/cli/tests/cli.test.ts |
Updates the CLI balance fixture. |
packages/cli/src/cli.ts |
Uses StackingClient for balance requests. |
packages/api/src/types.ts |
Defines v3 balance response types. |
packages/api/src/api.ts |
Migrates balance fetching to v3. |
.changeset/shiny-moons-attend.md |
Records the transactions change. |
.changeset/lucky-buses-repeat.md |
Records balance API changes. |
Suppressed comments (1)
packages/cli/src/cli.ts:1746
- Use
availablefor this spendability check. With locked or pending STX,balancecan exceedavailable, causing the CLI to proceed and submit a stack transaction for funds that cannot be locked; the transaction then fails instead of producing the intended local balance error.
const balanceBN = balance.balance;
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jannik-stacks
previously approved these changes
Sep 15, 2026
There was a problem hiding this comment.
🟡 Changes recommended
The stacking package still exposes a production path that calls the deprecated v1 balance endpoint.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 40/40 changed files
- Comments generated: 2
- Review effort level: Balanced
jannik-stacks
approved these changes
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates deprecated
/extended/v1Stacks API endpoints to their/extended/v3replacements:/extended/v1/address/{address}/balances→/extended/v3/principals/{principal}/balances/stx/extended/v1/address/{address}/nonces→/extended/v3/principals/{principal}/nonces