-
Notifications
You must be signed in to change notification settings - Fork 0
fix: change coverage status from patch to project in codecov.yml for … #20
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
Conversation
…accurate reporting
- Removed unused properties and methods from PrivacyChannel, including _derivator and related methods. - Simplified getDerivator method to create a new StellarDerivator instance directly. - Added static methods in UtxoBasedStellarAccount and MoonlightTransactionBuilder to create instances from PrivacyChannel, enhancing integration. - Updated integration tests to utilize new static methods for creating transaction builders and UTXO account handlers, improving test clarity and maintainability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the privacy channel and UTXO-based account modules to improve usability and maintainability by introducing static factory methods (fromPrivacyChannel) that simplify integration. The refactoring removes helper methods from PrivacyChannel in favor of static factory methods on UtxoBasedStellarAccount and MoonlightTransactionBuilder, making the API more intuitive and aligned with best practices. Additionally, the codecov configuration is updated from patch to project coverage reporting.
Key changes:
- Added static factory methods
fromPrivacyChanneltoUtxoBasedStellarAccountandMoonlightTransactionBuilderfor easier instantiation - Refactored
PrivacyChannelto remove stateful_derivatorfield and deprecated helper methods - Updated integration tests to demonstrate the new API usage patterns
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| codecov.yml | Changed coverage status from patch to project for more accurate reporting |
| src/privacy-channel/index.ts | Removed _derivator field and helper methods; refactored getDerivator() to create instances on-demand |
| src/privacy-channel/types.ts | Removed deprecated GetUTXOAccountHandlerArgs type and cleaned up imports |
| src/transaction-builder/index.ts | Added fromPrivacyChannel static factory method for convenient builder instantiation |
| src/utxo-based-account/utxo-based-stellar-account/index.ts | Added fromPrivacyChannel static factory method for creating account handlers |
| test/integration/privacy-channel.integration.test.ts | Updated tests to use new MoonlightTransactionBuilder.fromPrivacyChannel() API |
| test/integration/utxo-based-account.integration.test.ts | Updated tests to use new UtxoBasedStellarAccount.fromPrivacyChannel() API |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This pull request introduces several enhancements and refactorings to the privacy channel and UTXO-based account modules, focusing on better type safety, extensibility, and convenience for users of the SDK. The most notable changes are the addition of new helper methods to the
PrivacyChannelclass for easier integration with UTXO-based accounts, and the extraction of constructor argument types to improve code maintainability.Privacy channel enhancements:
Added
getBalancesFetcher,getTransactionBuilder, andgetUTXOAccountHandlerhelper methods to thePrivacyChannelclass, making it easier to interact with UTXO-based Stellar accounts and build transactions in a pre-configured manner. (src/privacy-channel/index.tssrc/privacy-channel/index.tsR153-R219)Introduced the
GetUTXOAccountHandlerArgstype for thegetUTXOAccountHandlermethod, enabling type-safe construction of UTXO-based account handlers with customizable options. (src/privacy-channel/types.tssrc/privacy-channel/types.tsR81-R96)UTXO-based account refactoring:
UTXOBasedAccountConstructorArgstype to a dedicated type definition, and updated theUtxoBasedAccountconstructor to use this type, improving clarity and extensibility for account instantiation. (src/utxo-based-account/types.ts[1]src/utxo-based-account/index.ts[2]Dependency and version updates:
0.4.0to0.5.0to reflect the new features and API changes. (deno.jsondeno.jsonL3-R3)Type import improvements:
src/privacy-channel/index.ts[1]src/privacy-channel/types.ts[2]src/utxo-based-account/index.ts[3]src/utxo-based-account/types.ts[4]…accurate reporting