Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ (dmk) [DSDK-542]: Add API calls and models for secure channel #469

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jdabbech-ledger
Copy link
Contributor

@jdabbech-ledger jdabbech-ledger commented Nov 4, 2024

πŸ“ Description

Manager api calls for secure channel

❓ Context

  • Feature:

βœ… 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
  • 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.

@jdabbech-ledger jdabbech-ledger requested a review from a team as a code owner November 4, 2024 11:38
Copy link

vercel bot commented Nov 4, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
device-sdk-ts-sample βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Nov 5, 2024 9:36am

Copy link
Contributor

github-actions bot commented Nov 4, 2024

Messages
βœ… Danger: All checks passed successfully! πŸŽ‰

Generated by 🚫 dangerJS against 9b0f85f

@@ -91,7 +91,10 @@ export class GetOsVersionCommand implements Command<GetOsVersionResponse> {
}
const parser = new ApduParser(apduResponse);

const targetId = parser.encodeToHexaString(parser.extractFieldByLength(4));
const targetId = parseInt(
Copy link
Contributor

Choose a reason for hiding this comment

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

[ASK] why parseInt then toString on a string ?

Copy link
Contributor Author

@jdabbech-ledger jdabbech-ledger Nov 5, 2024

Choose a reason for hiding this comment

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

To convert the hexastring to a decimal string, because the API only accept base 10 number for targetId.
The base 10 conversion has to be done on the whole number.

type BaseFirmware = {
id: number;
name: string;
description: string | null | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

[ASK] Do we really need null and undefined ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As it's a model that comes from API, I guess yes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any API doc for this endpoint ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not that I know of, this type is the same in LL

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I was thinking if the null is really useful here or needed for the business logic on the LL side

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