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

✨ (signer-btc) [DSDK-472]: Implement update PSBT and extract transaction #607

Merged

Conversation

jdabbech-ledger
Copy link
Contributor

@jdabbech-ledger jdabbech-ledger commented Jan 13, 2025

πŸ“ Description

  • Update PSBT task
  • Extract transaction task
  • Sign transaction DA
sign_transaction.mp4

❓ 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 January 13, 2025 11:23
Copy link

vercel bot commented Jan 13, 2025

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 Jan 17, 2025 1:51pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
doc-device-management-kit ⬜️ Ignored (Inspect) Visit Preview Jan 17, 2025 1:51pm

Copy link
Contributor

github-actions bot commented Jan 13, 2025

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

Generated by 🚫 dangerJS against eae62c9

private readonly _args: ExtractTransactionTaskArgs,
private readonly _valueParser: ValueParser,
) {}
run(): CommandResult<string, BtcErrorCodes> {
Copy link
Contributor

Choose a reason for hiding this comment

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

[COULD] you could use HexaString type instead of string as you return a bufferToHexaString

Uint8Array.from([]),
);

if (signature.length != 64 && signature.length != 65) {
Copy link
Contributor

Choose a reason for hiding this comment

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

[COULD] use const for 64 and 65 values

}

function writePush(buf: ByteArrayBuilder, data: Uint8Array) {
if (data.length <= 75) {
Copy link
Contributor

Choose a reason for hiding this comment

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

[COULD] same for theses values if possible

Base automatically changed from feat/dsdk-471-sign-psbt-task to develop January 14, 2025 13:47
const signature = maybeSignature.mapOrDefault(
(v) => v.data,
Uint8Array.from([]),
);
Copy link
Contributor

Choose a reason for hiding this comment

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

[COULD] since you already verified it at line 258, maybe you could just use something like maybeSignature.unsafeCoerce().data

Copy link
Contributor

@paoun-ledger paoun-ledger left a comment

Choose a reason for hiding this comment

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

lgtm

@jdabbech-ledger jdabbech-ledger added this pull request to the merge queue Jan 17, 2025
Merged via the queue into develop with commit 40a001e Jan 17, 2025
10 checks passed
@jdabbech-ledger jdabbech-ledger deleted the feat/dsdk-472-update-psbt-extract-transaction branch January 17, 2025 18:45
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