Skip to content

✨ (solana-signer) [DSDK-1098]: Solana transaction check & Solana provide context refactor#1481

Merged
fAnselmi-Ledger merged 6 commits into
feat/no-issue-improve-typing-into-context-module-refactorfrom
feat/dsdk-1098-solana-transaction-check
May 13, 2026
Merged

✨ (solana-signer) [DSDK-1098]: Solana transaction check & Solana provide context refactor#1481
fAnselmi-Ledger merged 6 commits into
feat/no-issue-improve-typing-into-context-module-refactorfrom
feat/dsdk-1098-solana-transaction-check

Conversation

@fAnselmi-Ledger

Copy link
Copy Markdown
Contributor

📝 Description

Adds end-to-end Solana transaction-check support, layered on top of the typing/multichain refactor in the base branch.

Solana app: APDU + opt-in flow

  • New commands: ProvideWeb3CheckCommand, Web3CheckOptInCommand
  • GetAppConfigurationCommand extended to expose transaction-check opt-in/enabled fields
  • SignTransactionDeviceAction extended with the opt-in state-machine branch (gated by app version, device model, opt-in flag)

Solana signer: provide-context refactor

  • ProvideTransactionContextTask split into a per-type context-provider registry (provideContextRegistry.ts dispatching to provideTokenContext, provideLifiContext, provideTransactionCheckContext)
  • Added a new SolanaContextSuccessType without a registry handler is now a compile error

Context module: Solana transaction-check loader

  • New SOLANA_TRANSACTION_CHECK clear-sign context type with typed payload { descriptor: string }
  • New SolanaTransactionCheckLoader (modules/multichain/transaction-check/loaders/) sharing the existing HttpTransactionCheckDataSource with the Ethereum loader, hits /solana/scan/tx
  • New solanaTransactionCheckModuleFactory wired into the Solana case of di.ts and DefaultContextModule
  • SolanaTransactionScanChainId enum (Mainnet/Devnet/Testnet) exposed from modules/solana/model/

Solana signer: wire transaction-check

  • BuildTransactionContextTask requests SOLANA_TRANSACTION_CHECK alongside SOLANA_TOKEN / SOLANA_LIFI / SOLANA_TRUSTED_NAME and includes the result in loadersResults
  • Transaction-check request derived from signerAddress + bs58-encoded transactionBytes + SolanaTransactionScanChainId.MAINNET
  • provideTransactionCheckContext handler: loads the PKI cert then chunks the descriptor via ProvideWeb3CheckCommand

❓ 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 requested a review from a team as a code owner May 11, 2026 15:14
@vercel

vercel Bot commented May 11, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
device-sdk-ts-sample Ready Ready Preview, Comment May 13, 2026 4:12pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
doc-device-management-kit Ignored Ignored May 13, 2026 4:12pm

Request Review

@ledger-wiz-cspm-secret-detection

ledger-wiz-cspm-secret-detection Bot commented May 11, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 1 Low
Software Management Finding Software Management Findings -
Total 1 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

Danger Check Results

Messages

Danger: All checks passed successfully! 🎉

Generated by 🚫 dangerJS against 2b8241d

resolver: ApplicationResolver,
) {
this.modelId = deviceState.deviceModelId;
this.appName =

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.

[ASK] why appName can be undefined?

@fAnselmi-Ledger fAnselmi-Ledger May 13, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ConnectedState variant has no currentApp, which is why the narrowing falls back to undefined

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.

if the state is connected but not ready yet we should not enter in this part of code no? because we have the same problem with other signers, wdyt?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agree it's an issue across signers! Currently harmless here because SolanaApplicationResolver.resolve already returns isCompatible: false for Connected state, so the undefined fallback never affects the result.

Comment thread .changeset/large-stars-relate.md
resolver: ApplicationResolver,
) {
this.modelId = deviceState.deviceModelId;
this.appName =

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.

if the state is connected but not ready yet we should not enter in this part of code no? because we have the same problem with other signers, wdyt?

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
19.9% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@fAnselmi-Ledger fAnselmi-Ledger merged commit 86d611e into feat/no-issue-improve-typing-into-context-module-refactor May 13, 2026
30 of 32 checks passed
@fAnselmi-Ledger fAnselmi-Ledger deleted the feat/dsdk-1098-solana-transaction-check branch May 13, 2026 16: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.

2 participants