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

refactor(rpc): migrate signPsbt methods #658

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

Conversation

kyranjamie
Copy link
Collaborator

This PR migrates over all the methods used in the extension for signPsbt. Everything we had in here was from Btckit and some properties had since changed.

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 29.41%. Comparing base (d61f889) to head (cf371af).
Report is 130 commits behind head on dev.

Files with missing lines Patch % Lines
packages/utils/src/index.ts 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #658      +/-   ##
==========================================
- Coverage   29.41%   29.41%   -0.01%     
==========================================
  Files         175      175              
  Lines        6836     6840       +4     
  Branches      457      457              
==========================================
+ Hits         2011     2012       +1     
- Misses       4825     4828       +3     
Files with missing lines Coverage Δ
packages/utils/src/index.ts 31.21% <25.00%> (-0.17%) ⬇️
Components Coverage Δ
bitcoin 71.25% <ø> (ø)
query 12.65% <ø> (ø)
utils 49.00% <25.00%> (-0.20%) ⬇️
crypto 68.21% <ø> (ø)
stacks 72.38% <ø> (ø)

@kyranjamie kyranjamie force-pushed the refactor/migrate-sign-psbt branch from 82db01a to 265b449 Compare November 26, 2024 09:37
signAtIndex: z
.union([z.number(), z.array(z.number())])
.optional()
.refine(testIsNumberOrArrayOfNumbers),
Copy link
Contributor

@tigranpetrossian tigranpetrossian Nov 26, 2024

Choose a reason for hiding this comment

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

Is this by any chance a leftover? The refinement seems to be doing the same as the two rules above.
Also curious what's the context of testIsNumberOrArrayOfNumbers being a wrapper around isNumberOrNumberList + isUndefined?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah that's a very good point, I've been in yup → zod migration mode and indeed, this is the same thing 🤔

@markmhendrickson
Copy link

markmhendrickson commented Dec 19, 2024

@kyranjamie this should presumably undergo design review before release? We'll need a build generated for testing

@markmhendrickson
Copy link

Is there a relevant issue to link?

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.

5 participants