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

chore: siwx bitcoin jsdocs comments #3476

Merged
merged 6 commits into from
Dec 16, 2024
Merged

chore: siwx bitcoin jsdocs comments #3476

merged 6 commits into from
Dec 16, 2024

Conversation

zoruka
Copy link
Contributor

@zoruka zoruka commented Dec 16, 2024

Description

Add jsdocs comments explaining params and functions from SIWX and Bitcoin packages.

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

For Linear issues: Closes APKT-xxx
For GH issues: closes #...

Showcase (Optional)

If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

Copy link

vercel bot commented Dec 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
appkit-builder 🛑 Canceled (Inspect) Dec 16, 2024 10:53pm
appkit-laboratory ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2024 10:53pm
appkit-vue-solana ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2024 10:53pm
appkit-wagmi-cdn-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2024 10:53pm
vue-wagmi-example 🛑 Canceled (Inspect) Dec 16, 2024 10:53pm

Copy link

changeset-bot bot commented Dec 16, 2024

🦋 Changeset detected

Latest commit: ca40f8f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@reown/appkit-scaffold-ui Patch
@reown/appkit Patch
@reown/appkit-core Patch
@reown/appkit-siwx Patch
@reown/appkit-ui Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit-utils Patch
@reown/appkit-cdn Patch
@reown/appkit-cli Patch
@reown/appkit-common Patch
@reown/appkit-experimental Patch
@reown/appkit-polyfills Patch
@reown/appkit-siwe Patch
@reown/appkit-wallet Patch
@reown/appkit-wallet-button Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment on lines +50 to +52
/**
* The address to send the transfer to
*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this restricted to any specific type of addresS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, i dont think it should

Copy link
Contributor

github-actions bot commented Dec 16, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 53.93% 14817 / 27473
🔵 Statements 53.93% 14817 / 27473
🔵 Functions 40.79% 1064 / 2608
🔵 Branches 75.37% 1889 / 2506
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/adapters/bitcoin/src/utils/BitcoinConnector.ts 100% 100% 100% 100%
packages/core/src/utils/SIWXUtil.ts 8.55% 100% 0% 8.55% 20, 23-59, 62-137, 140-151, 154-162, 165-176, 179-270, 273-279, 46-262
packages/siwx/src/configs/CloudAuthSIWX.ts 100% 100% 100% 100%
packages/siwx/src/configs/DefaultSIWX.ts 45% 100% 0% 45% 9-13, 29-34
packages/siwx/src/core/SIWXConfig.ts 18.75% 100% 0% 18.75% 21-24, 33-34, 44-50, 61-69, 80-94, 104-105, 116-122
packages/siwx/src/core/SIWXMessenger.ts 100% 93.33% 100% 100%
packages/siwx/src/core/SIWXVerifier.ts 100% 100% 100% 100%
packages/siwx/src/storages/LocalStorage.ts 77.55% 62.5% 85.71% 77.55% 16-21, 38-39, 43-44, 63-64
packages/siwx/src/verifiers/BIP122Verifier.ts 84.61% 66.66% 100% 84.61% 19-20
packages/siwx/src/verifiers/EIP155Verifier.ts 100% 100% 100% 100%
packages/siwx/src/verifiers/SolanaVerifier.ts 86.66% 66.66% 100% 86.66% 23-24
Generated in workflow #8148 for commit ca40f8f by the Vitest Coverage Report Action

Comment on lines +13 to +15
/**
* The version of the SIWXMessage class
*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's the current / defualt version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is no default version, this is an abstract class, the one extending it must provide a version

Comment on lines +83 to +89
/**
* This method generates the expiration time based on the `notBefore` value and the `expiration` value.
* You may override this method to provide a custom expiration time.
*
* @param Pick<SIWXMessage.Input, 'notBefore'>
* @returns string | undefined - The expiration time in `stringifyDate` format or undefined if not available
*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this a utility? or is this core to the package?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is an abstract class that must be extended to provide the functionality, this is only predefined logic

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