Skip to content

✨ (context-module) [DSDK-1515]: NativePreBalance DTO + owner-without-mint warn for TOKEN_ACCOUNT_STATE - #1881

Merged
fAnselmi-Ledger merged 1 commit into
feat/dsdk-1514-solana-account-reset-domainsfrom
feat/dsdk-1515-solana-native-pre-balance-owner-mint-warning
Sep 18, 2026
Merged

fAnselmi-Ledger merged 1 commit into
feat/dsdk-1514-solana-account-reset-domainsfrom
feat/dsdk-1515-solana-native-pre-balance-owner-mint-warning

Conversation

@fAnselmi-Ledger

Copy link
Copy Markdown
Contributor

📝 Description

PR-2 of the DMK alignment with CAL edits

  • nativePreBalance in TOKEN_ACCOUNT_STATE response DTO
    (spec/backend/dynamic_descriptors_api.md#nativeprebalance) The field is now required on every backend response. It is the unsynced wrappable lamport excess (not the raw balance) that the device reads from the signed descriptor. Host-side we only need to accept it in the DTO, it is not consumed or validated here. An absent field means an old backend, we log a debug trace and carry on (no soundness loss, just extra screens on native-reset instructions).

  • Warn when path-3 response has owner but no mint
    (spec/device/tlv_structs.md#owner-and-the-owner-binding-map) Before admitting an attested OWNER into the owner-binding map the device now checks ACCOUNT_ADDRESS == PDA([OWNER, tokenProgram, MINT], ATA program) and drops the binding silently when MINT is absent. DMK sends the same request as before, no functional change, but a response without mint is now inert: the fetch was paid for and the IS_SIGNER hide will not happen. The warn makes the regression visible in logs.

❓ Context

✅ Checklist

Pull Requests must pass CI checks and undergo code review. Set the PR as Draft if it is not yet ready for review.

  • Covered by automatic tests
  • Changeset is provided
  • Documentation is up-to-date
  • Impact of the changes:
    • list of the changes

🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.

@fAnselmi-Ledger
fAnselmi-Ledger added this pull request to stack #1882 September 11, 2026 15:56
@fAnselmi-Ledger
fAnselmi-Ledger requested a review from a team as a code owner September 11, 2026 15:56
@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
device-sdk-ts-sample Ready Ready Preview Sep 18, 2026 5:14pm UTC
doc-device-management-kit Ready Ready Preview Sep 18, 2026 5:14pm UTC

Request Review

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Danger Check Results

Messages

Danger: All checks passed successfully! 🎉

Generated by 🚫 dangerJS against c6a2056

@fAnselmi-Ledger
fAnselmi-Ledger force-pushed the feat/dsdk-1515-solana-native-pre-balance-owner-mint-warning branch from a7fa856 to fbd691a Compare September 11, 2026 16:02
@fAnselmi-Ledger fAnselmi-Ledger changed the title ✨ (context-module) [DSDK-XXXX]: nativePreBalance DTO + owner-without-mint warn for TOKEN_ACCOUNT_STATE ✨ (context-module) [DSDK-1515]: NativePreBalance DTO + owner-without-mint warn for TOKEN_ACCOUNT_STATE Sep 11, 2026
@fAnselmi-Ledger
fAnselmi-Ledger requested a lite review from Copilot September 11, 2026 16:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No unresolved blocking issues were identified.

Pull request overview

Adds Solana TOKEN_ACCOUNT_STATE support for nativePreBalance and diagnostics for owner responses missing mint.

Changes:

  • Accepts optional nativePreBalance and logs when absent.
  • Warns when owner is returned without mint.
  • Adds unit tests and a patch changeset.
File summaries
File Description
packages/signer/context-module/src/modules/solana/token-account-state/data/HttpTokenAccountStateDataSource.ts Adds DTO support and diagnostic logging.
packages/signer/context-module/src/modules/solana/token-account-state/data/HttpTokenAccountStateDataSource.test.ts Tests the new logging behavior.
.changeset/tame-cities-sneeze.md Records the package patch release.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

@sonarqubecloud

Copy link
Copy Markdown

@fAnselmi-Ledger
fAnselmi-Ledger added this pull request to the merge queue Sep 18, 2026
An error occurred while trying to automatically change base from feat/dsdk-1514-solana-account-reset-domains to develop September 18, 2026 17:38
Merged via the queue into develop with commit 55b82e9 Sep 18, 2026
30 of 37 checks passed
@fAnselmi-Ledger
fAnselmi-Ledger deleted the feat/dsdk-1515-solana-native-pre-balance-owner-mint-warning branch September 18, 2026 17:38
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.

3 participants