-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: 🎸 Add support for off-chain settlement legs #283
Conversation
WalkthroughThis update introduces new off-chain functionality to the existing codebase. Key changes include updating package dependencies, adding new methods for handling off-chain receipts, and extending data structures to support off-chain operations. Several new DTOs and models are introduced to facilitate these changes, incorporating validation and transformation decorators. The test cases have been updated to cover the new functionalities, ensuring comprehensive testing. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
08fea3f
to
fc1f1e8
Compare
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.
Actionable comments posted: 14
Outside diff range and nitpick comments (1)
src/settlements/settlements.util.ts (1)
Line range hint
38-48
: Refactor to remove the redundantelse
clause.The
else
clause is unnecessary since the previousif
block returns early.- } else { - // presume nft - const { nfts } = leg; - return new LegModel({ - asset, - from, - to, - nfts: nfts.map(({ id }) => id), - }); - } + } + // presume nft + const { nfts } = leg; + return new LegModel({ + asset, + from, + to, + nfts: nfts.map(({ id }) => id), + });
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (33)
- .vscode/settings.json (1 hunks)
- package.json (1 hunks)
- src/accounts/accounts.controller.spec.ts (1 hunks)
- src/accounts/accounts.controller.ts (2 hunks)
- src/accounts/accounts.service.spec.ts (1 hunks)
- src/accounts/accounts.service.ts (2 hunks)
- src/checkpoints/checkpoints.controller.spec.ts (1 hunks)
- src/portfolios/dto/portfolio-movement.dto.ts (1 hunks)
- src/settlements/dto/affirm-instruction.dto.ts (1 hunks)
- src/settlements/dto/asset-leg.dto.ts (1 hunks)
- src/settlements/dto/create-instruction.dto.ts (2 hunks)
- src/settlements/dto/create-venue.dto.ts (1 hunks)
- src/settlements/dto/execute-instruction.dto.ts (1 hunks)
- src/settlements/dto/leg-id-params.dto.ts (1 hunks)
- src/settlements/dto/leg.dto.ts (2 hunks)
- src/settlements/dto/offchain-affirmation-receipt.dto.ts (1 hunks)
- src/settlements/dto/offchain-leg.dto.ts (1 hunks)
- src/settlements/dto/offchain-signature.dto.ts (1 hunks)
- src/settlements/dto/update-venue-signers.dto.ts (1 hunks)
- src/settlements/models/created-instruction.model.ts (2 hunks)
- src/settlements/models/instruction.model.ts (3 hunks)
- src/settlements/models/off-chain-affirmation.model.ts (1 hunks)
- src/settlements/models/offchain-leg.model.ts (1 hunks)
- src/settlements/settlements.controller.spec.ts (5 hunks)
- src/settlements/settlements.controller.ts (5 hunks)
- src/settlements/settlements.module.ts (2 hunks)
- src/settlements/settlements.service.spec.ts (9 hunks)
- src/settlements/settlements.service.ts (8 hunks)
- src/settlements/settlements.util.ts (5 hunks)
- src/settlements/venues.controller.spec.ts (1 hunks)
- src/settlements/venues.controller.ts (1 hunks)
- src/test-utils/mocks.ts (3 hunks)
- src/test-utils/service-mocks.ts (3 hunks)
Files not summarized due to errors (2)
- src/portfolios/dto/portfolio-movement.dto.ts: Error: Server error. Please try again later.
- src/settlements/dto/offchain-affirmation-receipt.dto.ts: Error: Server error. Please try again later.
Files skipped from review due to trivial changes (2)
- .vscode/settings.json
- package.json
Additional context used
Path-based instructions (31)
src/settlements/dto/leg-id-params.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/execute-instruction.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/update-venue-signers.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/asset-leg.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/models/off-chain-affirmation.model.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/settlements.module.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/create-venue.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/offchain-signature.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/models/created-instruction.model.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/portfolios/dto/portfolio-movement.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/affirm-instruction.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/models/offchain-leg.model.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/offchain-leg.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/offchain-affirmation-receipt.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/leg.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/settlements.util.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/create-instruction.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/models/instruction.model.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/venues.controller.spec.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/accounts/accounts.service.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/venues.controller.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/settlements.service.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/test-utils/service-mocks.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/settlements.controller.spec.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/accounts/accounts.controller.spec.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/checkpoints/checkpoints.controller.spec.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/test-utils/mocks.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/settlements.controller.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/accounts/accounts.service.spec.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/accounts/accounts.controller.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/settlements.service.spec.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.
Biome
src/settlements/settlements.util.ts
[error] 38-48: This else clause can be omitted because previous branches break early.
Unsafe fix: Omit the else clause.
(lint/style/noUselessElse)
src/settlements/venues.controller.ts
[error] 40-40: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 62-62: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 79-79: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 104-104: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 105-105: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 126-126: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 127-127: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 152-152: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 153-153: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 179-179: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 180-180: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
src/test-utils/service-mocks.ts
[error] 285-287: This else clause can be omitted because previous branches break early.
Unsafe fix: Omit the else clause.
(lint/style/noUselessElse)
src/settlements/settlements.controller.ts
[error] 56-56: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 79-79: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 80-80: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 103-103: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 104-104: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 130-130: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 131-131: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 155-155: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 156-156: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 179-179: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 180-180: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 206-206: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 207-207: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 245-245: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 246-246: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 285-285: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 323-323: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 344-344: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 381-381: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 382-382: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
src/accounts/accounts.controller.ts
[error] 77-77: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 101-101: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 123-123: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 145-145: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 146-146: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 178-178: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 202-202: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 202-202: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 228-228: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 250-250: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 270-270: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 288-288: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 328-328: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 365-365: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
Additional comments not posted (100)
src/settlements/dto/leg-id-params.dto.ts (3)
1-2
: Remove unnecessaryistanbul ignore file
comment.The
istanbul ignore file
comment prevents code coverage tools from analyzing this file. Ensure you need this, as it can hide untested code.
3-7
: LGTM! Imports are appropriate.The imports are relevant and necessary for the functionality provided in this file.
9-13
: LGTM! The DTO class is well-structured.The
LegIdParamsDto
class is correctly extendingIdParamsDto
and the decorators for validation and transformation are appropriately used.src/settlements/dto/execute-instruction.dto.ts (3)
1-5
: Remove unnecessaryistanbul ignore file
comment.The
istanbul ignore file
comment prevents code coverage tools from analyzing this file. Ensure you need this, as it can hide untested code.
3-5
: LGTM! Imports are appropriate.The imports are relevant and necessary for the functionality provided in this file.
8-17
: LGTM! The DTO class is well-structured.The
ExecuteInstructionDto
class is correctly extendingTransactionBaseDto
and the decorators for validation and API documentation are appropriately used.src/settlements/dto/update-venue-signers.dto.ts (3)
1-5
: Remove unnecessaryistanbul ignore file
comment.The
istanbul ignore file
comment prevents code coverage tools from analyzing this file. Ensure you need this, as it can hide untested code.
3-5
: LGTM! Imports are appropriate.The imports are relevant and necessary for the functionality provided in this file.
8-17
: LGTM! The DTO class is well-structured.The
UpdateVenueSignersDto
class is correctly extendingTransactionBaseDto
and the decorators for validation and API documentation are appropriately used.src/settlements/dto/asset-leg.dto.ts (4)
1-5
: Remove unnecessaryistanbul ignore file
comment.The
istanbul ignore file
comment prevents code coverage tools from analyzing this file. Ensure you need this, as it can hide untested code.
3-5
: LGTM! Imports are appropriate.The imports are relevant and necessary for the functionality provided in this file.
7-10
: LGTM! The enum is well-defined.The
LegType
enum is correctly defined and appropriately used.
12-31
: LGTM! The DTO class is well-structured.The
AssetLegDto
class is correctly defined with appropriate properties and a constructor that assigns the DTO values to the class properties.src/settlements/models/off-chain-affirmation.model.ts (4)
3-7
: Organize imports alphabetically.For better readability and maintainability, consider organizing the imports alphabetically.
9-16
: Ensure BigNumber transformation is handled correctly.The
@FromBigNumber
decorator is used to transform thelegId
from aBigNumber
to a string. Ensure that this transformation is correctly handled during serialization and deserialization.
18-24
: Ensure correct usage ofAffirmationStatus
enum.The
status
property uses theAffirmationStatus
enum. Verify that this enum is correctly defined and used throughout the codebase.
26-28
: Ensure deep copy in the constructor.The constructor uses
Object.assign(this, model)
, which performs a shallow copy. Ensure that a shallow copy is sufficient and there are no nested objects that require deep copying.src/settlements/settlements.module.ts (1)
10-10
: LGTM! EnsureVenuesController
is implemented correctly.The addition of
VenuesController
to the module controllers looks good. Verify that theVenuesController
is correctly implemented and tested.Also applies to: 22-22
Verification successful
VenuesController is correctly implemented and tested.
The
VenuesController
class is implemented insrc/settlements/venues.controller.ts
and thoroughly tested insrc/settlements/venues.controller.spec.ts
.
- Implementation:
src/settlements/venues.controller.ts
- Tests:
src/settlements/venues.controller.spec.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation and tests for VenuesController. # Test: Ensure the VenuesController is implemented. rg --type ts 'class VenuesController' src/settlements/venues.controller.ts # Test: Ensure the VenuesController is tested. rg --type ts 'VenuesController' src/settlements/venues.controller.spec.tsLength of output: 427
src/settlements/dto/offchain-signature.dto.ts (3)
3-6
: Organize imports alphabetically.For better readability and maintainability, consider organizing the imports alphabetically.
16-24
: LGTM! Ensurevalue
property is handled correctly.The
value
property is optional and uses a specific string pattern. Verify that thevalue
property is correctly handled in the related logic and tests.
7-14
: LGTM! EnsureSignerKeyRingType
enum is correctly handled.The
type
property uses theSignerKeyRingType
enum. Verify that this enum is correctly defined and used throughout the codebase.src/settlements/models/created-instruction.model.ts (2)
9-9
: Import statement added.The
OffChainLegModel
was imported. This seems necessary for supporting the off-chain legs feature.
25-26
: Update Type Decorator for Clarity.The
@Type
decorator is commented out. It might be necessary for proper transformation and validation of thelegs
property.import { Type } from 'class-transformer'; ... @Type(() => LegModel) readonly legs: (LegModel | OffChainLegModel)[];src/portfolios/dto/portfolio-movement.dto.ts (1)
30-30
: Ensure Consistent Validation for NFT IDs.The
isArray
property was added to the@ApiPropertyOptional
decorator. This is appropriate for indicating thatnfts
is an array.src/settlements/dto/affirm-instruction.dto.ts (2)
12-20
: New Property: Portfolios.The
portfolios
property was added with appropriate decorators for validation and transformation.
22-31
: New Property: Receipts.The
receipts
property was added with appropriate decorators for validation and transformation.src/settlements/models/offchain-leg.model.ts (5)
10-16
: New Property: From.The
from
property was added with appropriate decorators for validation and transformation.
18-24
: New Property: To.The
to
property was added with appropriate decorators for validation and transformation.
26-32
: New Property: OffChainAmount.The
offChainAmount
property was added with appropriate decorators for validation and transformation.
34-39
: New Property: Asset.The
asset
property was added with appropriate decorators for validation and transformation.
41-43
: Constructor Method.The constructor method was added to initialize the
OffChainLegModel
class with the provided model.src/settlements/dto/offchain-leg.dto.ts (8)
1-1
: Consider removing the/* istanbul ignore file */
directive.This directive excludes the file from test coverage. Ensure this is intentional and justified.
3-5
: Good use of imports.The necessary modules from
@nestjs/swagger
,@polymeshassociation/polymesh-sdk
, and other dependencies are correctly imported.
11-11
: ClassOffChainLegDto
extendsAssetLegDto
.The class correctly extends
AssetLegDto
to inherit properties and methods.
12-17
: Correct use of@ApiProperty
decorator forfrom
.The
from
property is correctly annotated with@ApiProperty
to describe its API metadata.
19-24
: Correct use of@ApiProperty
decorator forto
.The
to
property is correctly annotated with@ApiProperty
to describe its API metadata.
26-33
: Correct use of@ApiPropertyOptional
,@IsBigNumber
, and@ToBigNumber
foroffChainAmount
.The
offChainAmount
property is correctly annotated with optional API metadata and validation decorators.
35-38
: Well-implementedtoLeg
method.The
toLeg
method correctly converts the DTO to anInstructionOffChainLeg
object.
40-44
: Constructor correctly initializes the DTO.The constructor uses
Object.assign
to initialize the DTO properties, ensuring proper inheritance fromAssetLegDto
.src/settlements/dto/offchain-affirmation-receipt.dto.ts (8)
1-1
: Consider removing the/* istanbul ignore file */
directive.This directive excludes the file from test coverage. Ensure this is intentional and justified.
3-6
: Good use of imports.The necessary modules from
@nestjs/swagger
,@polymeshassociation/polymesh-sdk
, and other dependencies are correctly imported.
12-20
: Correct use of@ApiProperty
,@ToBigNumber
, and@IsBigNumber
foruid
.The
uid
property is correctly annotated with API metadata and validation decorators.
22-29
: Correct use of@ApiProperty
,@ToBigNumber
, and@IsBigNumber
forlegId
.The
legId
property is correctly annotated with API metadata and validation decorators.
31-38
: Correct use of@ApiProperty
and@IsString
forsigner
.The
signer
property is correctly annotated with API metadata and validation decorators.
40-46
: Correct use of@ApiProperty
,@ValidateNested
, and@Type
forsignature
.The
signature
property is correctly annotated with API metadata and validation decorators.
48-55
: Correct use of@ApiProperty
,@IsOptional
, and@IsString
formetadata
.The
metadata
property is correctly annotated with optional API metadata and validation decorators.
57-59
: Constructor correctly initializes the DTO.The constructor uses
Object.assign
to initialize the DTO properties.src/settlements/dto/leg.dto.ts (7)
5-5
: Good use of imports.The necessary modules from
@nestjs/swagger
,@polymeshassociation/polymesh-sdk
, and other dependencies are correctly imported.
Line range hint
15-19
: Correct use of@ApiPropertyOptional
,@ValidateIf
,@IsBigNumber
, and@ToBigNumber
foramount
.The
amount
property is correctly annotated with optional API metadata and validation decorators.
Line range hint
21-26
: Correct use of@ApiPropertyOptional
,@ValidateIf
,@IsBigNumber
, and@ToBigNumber
fornfts
.The
nfts
property is correctly annotated with optional API metadata and validation decorators.
Line range hint
28-40
: Correct use of@ApiProperty
,@ValidateNested
, and@Type
forfrom
.The
from
property is correctly annotated with API metadata and validation decorators.
Line range hint
42-54
: Correct use of@ApiProperty
,@ValidateNested
, and@Type
forto
.The
to
property is correctly annotated with API metadata and validation decorators.
60-80
: Well-implementedtoLeg
method.The
toLeg
method correctly converts the DTO to anInstructionFungibleLeg
orInstructionNftLeg
object. The error handling for missingnfts
oramount
is appropriate.
82-86
: Constructor correctly initializes the DTO.The constructor uses
Object.assign
to initialize the DTO properties, ensuring proper inheritance fromAssetLegDto
.src/settlements/settlements.util.ts (4)
7-7
: Good use of imports.The necessary modules from
@polymeshassociation/polymesh-sdk
,~/common/models
, and other dependencies are correctly imported.
14-14
: Correct import ofOffChainLegModel
.The
OffChainLegModel
is correctly imported for use in the utility functions.
23-25
: Proper handling of off-chain legs.The
legsToLegModel
function correctly identifies and handles off-chain legs using theisOffChainLeg
utility.
94-96
: Ensure correct handling ofendAfterBlock
property.The
endAfterBlock
property is correctly assigned forInstructionType.SettleManual
.src/settlements/dto/create-instruction.dto.ts (3)
2-2
: Remove unnecessary/* istanbul ignore file */
directive.The directive to ignore the entire file in coverage reports should be removed unless there is a specific reason to exclude it.
16-16
: Add description for@ApiExtraModels
.Provide a brief description for the
@ApiExtraModels
decorator to enhance readability and maintainability.@ApiExtraModels(LegDto, OffChainLegDto) // Models used in this DTO
69-78
: Ensure consistency in property descriptions.The description for
endAfterBlock
should match the format and clarity of other property descriptions.- description: 'Block after which the Instruction can be manually executed. If not passed, the Instruction will be executed when all parties affirm or as soon as one party rejects', + description: 'Block after which the Instruction can be manually executed. This value will only be present for "SettleManual" type Instruction',src/settlements/models/instruction.model.ts (2)
70-77
: Ensure consistency in property descriptions.The description for
endAfterBlock
should match the format and clarity of other property descriptions.- description: 'Block after which the Instruction can be manually executed. This value will only be present for "SettleManual" type Instruction', + description: 'Block after which the Instruction can be manually executed. If not passed, the Instruction will be executed when all parties affirm or as soon as one party rejects',
93-99
: Ensure type consistency in@ApiPropertyOneOf
.Ensure that the type used in the
@ApiPropertyOneOf
decorator is consistent with thereadonly legs
property.@ApiPropertyOneOf({ description: 'List of Legs in the Instruction', isArray: true, union: [LegModel, OffChainLegModel], }) @Type(() => LegModel) // Ensure type consistency readonly legs: (LegModel | OffChainLegModel)[];src/settlements/venues.controller.spec.ts (3)
1-2
: Group imports from the same module.Group imports from the same module together to improve readability.
import { BigNumber, VenueType } from '@polymeshassociation/polymesh-sdk/types';
12-12
: Remove unnecessary destructuring.Destructuring
testValues
into individual constants is unnecessary and can be simplified.const testValues = { did, signer, txResult };
90-111
: Add assertions for input validation.Add assertions to validate the inputs for the
createInstruction
test case.describe('createInstruction', () => { it('should create an instruction and return the data returned by the service', async () => { const mockInstruction = new MockInstruction(); when(mockInstruction.getLegs).calledWith().mockResolvedValue({ data: [] }); const mockData = { ...txResult, result: mockInstruction, }; mockSettlementsService.createInstruction.mockResolvedValue(mockData); // eslint-disable-next-line @typescript-eslint/no-explicit-any const result = await controller.createInstruction({ id: new BigNumber(3) }, {} as any); expect(result).toEqual({ ...txResult, instruction: mockInstruction, // in jest the @FromEntity decorator is not applied legs: [], }); // Add assertions for input validation expect(mockSettlementsService.createInstruction).toHaveBeenCalledWith( { id: new BigNumber(3) }, expect.anything() ); }); });src/settlements/settlements.service.ts (9)
68-68
: LGTM!The code changes are approved.
95-99
: LGTM!The code changes are approved.
111-115
: LGTM!The code changes are approved.
117-124
: LGTM!The code changes are approved.
143-153
: LGTM!The code changes are approved.
170-208
: LGTM!The code changes are approved.
221-229
: LGTM!The code changes are approved.
111-115
: LGTM!The code changes are approved.
117-124
: LGTM!The code changes are approved.
src/test-utils/service-mocks.ts (2)
109-109
: LGTM!The code changes are approved.
Line range hint
162-174
: LGTM!The code changes are approved.
src/settlements/settlements.controller.spec.ts (4)
Line range hint
76-113
: LGTM!The code changes are approved.
244-257
: LGTM!The code changes are approved.
262-277
: LGTM!The code changes are approved.
308-319
: LGTM!The code changes are approved.
src/accounts/accounts.controller.spec.ts (1)
316-325
: LGTM! Verify the mock implementation.The test case for
getOffChainReceipts
correctly mocks thefetchOffChainReceipts
method and validates the response.src/checkpoints/checkpoints.controller.spec.ts (1)
321-321
: LGTM! Verify the mock implementation.The test case for
getComplexity
correctly mocks thegetComplexityForAsset
method and validates the response.src/test-utils/mocks.ts (3)
260-268
: LGTM! Verify the mock implementation.The new methods
getOffChainAffirmations
,getOffChainAffirmationForLeg
, andgenerateOffChainAffirmationReceipt
are correctly mocked in theMockInstruction
class.
282-284
: LGTM! Verify the mock implementation.The new methods
getAllowedSigners
,addSigners
, andremoveSigners
are correctly mocked in theMockVenue
class.
467-467
: LGTM! Verify the mock implementation.The new method
getOffChainReceipts
is correctly mocked in theMockAccount
class.src/settlements/settlements.controller.ts (5)
80-82
: LGTM! Verify the method implementation.The
affirmInstruction
method correctly handles the service call and response.Tools
Biome
[error] 80-80: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
284-296
: LGTM! Verify the method implementation.The
getOffChainAffirmations
method correctly handles the service call and response.Tools
Biome
[error] 285-285: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
322-329
: LGTM! Verify the method implementation.The
getOffChainAffirmationForLeg
method correctly handles the service call and response.Tools
Biome
[error] 323-323: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
Line range hint
344-344
: LGTM! Verify the method implementation.The
validateLeg
method correctly handles the service call and response.
380-386
: LGTM! Verify the method implementation.The
executeInstruction
method correctly handles the service call and response.Tools
Biome
[error] 381-381: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 382-382: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
src/accounts/accounts.service.spec.ts (1)
386-399
: Test case looks good!The
fetchOffChainReceipts
test case correctly mocks the dependencies and verifies the functionality.src/accounts/accounts.controller.ts (1)
365-371
: Function logic looks good!The
getOffChainReceipts
function correctly fetches and returns the off-chain receipts.Tools
Biome
[error] 365-365: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
src/settlements/settlements.service.spec.ts (7)
Line range hint
187-231
: Test case looks good!The
createInstruction
test case correctly mocks the dependencies and verifies the functionality for both on-chain and off-chain legs.
313-357
: Test case looks good!The
updateVenueSigners
test case correctly mocks the dependencies and verifies the functionality for both adding and removing signers.
Line range hint
360-456
: Test case looks good!The
affirmInstruction
test case correctly mocks the dependencies and verifies the functionality for affirming an instruction with and without receipts.
514-527
: Test case looks good!The
fetchAllowedSigners
test case correctly mocks the dependencies and verifies the functionality.
557-576
: Test case looks good!The
getOffChainAffirmations
test case correctly mocks the dependencies and verifies the functionality.
579-596
: Test case looks good!The
fetchOffChainAffirmationForALeg
test case correctly mocks the dependencies and verifies the functionality.
Line range hint
598-613
: Test case looks good!The
withdrawAffirmation
test case correctly mocks the dependencies and verifies the functionality.
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.
Actionable comments posted: 25
Outside diff range and nitpick comments (2)
src/settlements/settlements.util.ts (1)
Line range hint
38-48
: Remove redundant else clause.The else clause is redundant and can be omitted to simplify the code.
- } else { - // presume nft - const { nfts } = leg; - - return new LegModel({ - asset, - from, - to, - nfts: nfts.map(({ id }) => id), - }); - } + } + // presume nft + const { nfts } = leg; + + return new LegModel({ + asset, + from, + to, + nfts: nfts.map(({ id }) => id), + });src/settlements/settlements.service.ts (1)
Line range hint
243-247
: Ensure proper error handling inaffirmInstructionAsMediator
method.Consider adding error handling to manage potential errors when affirming an instruction as a mediator.
- return this.transactionsService.submit(instruction.affirmAsMediator, args, options); + return this.transactionsService.submit(instruction.affirmAsMediator, args, options).catch(error => { + throw handleSdkError(error); + });
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (33)
- .vscode/settings.json (1 hunks)
- package.json (1 hunks)
- src/accounts/accounts.controller.spec.ts (1 hunks)
- src/accounts/accounts.controller.ts (2 hunks)
- src/accounts/accounts.service.spec.ts (1 hunks)
- src/accounts/accounts.service.ts (2 hunks)
- src/checkpoints/checkpoints.controller.spec.ts (1 hunks)
- src/portfolios/dto/portfolio-movement.dto.ts (1 hunks)
- src/settlements/dto/affirm-instruction.dto.ts (1 hunks)
- src/settlements/dto/asset-leg.dto.ts (1 hunks)
- src/settlements/dto/create-instruction.dto.ts (2 hunks)
- src/settlements/dto/create-venue.dto.ts (1 hunks)
- src/settlements/dto/execute-instruction.dto.ts (1 hunks)
- src/settlements/dto/leg-id-params.dto.ts (1 hunks)
- src/settlements/dto/leg.dto.ts (2 hunks)
- src/settlements/dto/offchain-affirmation-receipt.dto.ts (1 hunks)
- src/settlements/dto/offchain-leg.dto.ts (1 hunks)
- src/settlements/dto/offchain-signature.dto.ts (1 hunks)
- src/settlements/dto/update-venue-signers.dto.ts (1 hunks)
- src/settlements/models/created-instruction.model.ts (2 hunks)
- src/settlements/models/instruction.model.ts (3 hunks)
- src/settlements/models/off-chain-affirmation.model.ts (1 hunks)
- src/settlements/models/offchain-leg.model.ts (1 hunks)
- src/settlements/settlements.controller.spec.ts (5 hunks)
- src/settlements/settlements.controller.ts (5 hunks)
- src/settlements/settlements.module.ts (2 hunks)
- src/settlements/settlements.service.spec.ts (9 hunks)
- src/settlements/settlements.service.ts (8 hunks)
- src/settlements/settlements.util.ts (5 hunks)
- src/settlements/venues.controller.spec.ts (1 hunks)
- src/settlements/venues.controller.ts (1 hunks)
- src/test-utils/mocks.ts (3 hunks)
- src/test-utils/service-mocks.ts (3 hunks)
Files skipped from review due to trivial changes (5)
- .vscode/settings.json
- package.json
- src/checkpoints/checkpoints.controller.spec.ts
- src/settlements/dto/asset-leg.dto.ts
- src/settlements/dto/leg-id-params.dto.ts
Additional context used
Path-based instructions (28)
src/settlements/dto/execute-instruction.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/update-venue-signers.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/models/off-chain-affirmation.model.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/settlements.module.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/create-venue.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/offchain-signature.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/models/created-instruction.model.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/portfolios/dto/portfolio-movement.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/affirm-instruction.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/models/offchain-leg.model.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/offchain-leg.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/offchain-affirmation-receipt.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/leg.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/settlements.util.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/dto/create-instruction.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/models/instruction.model.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/venues.controller.spec.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/accounts/accounts.service.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/venues.controller.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/settlements.service.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/test-utils/service-mocks.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/settlements.controller.spec.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/accounts/accounts.controller.spec.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/test-utils/mocks.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/settlements.controller.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/accounts/accounts.service.spec.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/accounts/accounts.controller.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/settlements.service.spec.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.
Biome
src/settlements/settlements.util.ts
[error] 38-48: This else clause can be omitted because previous branches break early.
Unsafe fix: Omit the else clause.
(lint/style/noUselessElse)
src/settlements/venues.controller.ts
[error] 40-40: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 62-62: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 79-79: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 104-104: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 105-105: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 126-126: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 127-127: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 152-152: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 153-153: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 179-179: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 180-180: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
src/test-utils/service-mocks.ts
[error] 285-287: This else clause can be omitted because previous branches break early.
Unsafe fix: Omit the else clause.
(lint/style/noUselessElse)
src/settlements/settlements.controller.ts
[error] 56-56: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 79-79: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 80-80: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 103-103: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 104-104: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 130-130: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 131-131: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 155-155: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 156-156: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 179-179: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 180-180: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 206-206: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 207-207: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 245-245: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 246-246: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 285-285: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 323-323: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 344-344: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 381-381: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 382-382: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
src/accounts/accounts.controller.ts
[error] 77-77: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 101-101: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 123-123: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 145-145: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 146-146: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 178-178: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 202-202: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 202-202: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 228-228: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 250-250: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 270-270: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 288-288: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 328-328: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
[error] 365-365: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.(parse)
Additional comments not posted (59)
src/settlements/dto/execute-instruction.dto.ts (2)
1-7
: LGTM! The import statements are correct.The import statements are necessary and correctly imported.
8-17
: LGTM! TheExecuteInstructionDto
class is well-defined.The class extends
TransactionBaseDto
and includes a property with appropriate decorators for validation and documentation.src/settlements/dto/update-venue-signers.dto.ts (2)
1-7
: LGTM! The import statements are correct.The import statements are necessary and correctly imported.
8-17
: LGTM! TheUpdateVenueSignersDto
class is well-defined.The class extends
TransactionBaseDto
and includes a property with appropriate decorators for validation and documentation.src/settlements/models/off-chain-affirmation.model.ts (3)
1-7
: LGTM! The import statements are correct.The import statements are necessary and correctly imported.
9-24
: LGTM! TheOffChainAffirmationModel
class is well-defined.The class includes properties with appropriate decorators for validation and documentation.
26-28
: LGTM! The constructor is well-defined.The constructor uses
Object.assign
to initialize the class properties.src/settlements/settlements.module.ts (2)
Line range hint
1-10
: LGTM! The import statements are correct.The import statements are necessary and correctly imported.
Line range hint
11-22
: LGTM! TheSettlementsModule
class is well-defined.The class imports necessary modules and provides services and controllers.
src/settlements/dto/affirm-instruction.dto.ts (1)
1-32
: LGTM!The
AffirmInstructionDto
class is well-structured, with appropriate validation and transformation decorators.src/settlements/models/offchain-leg.model.ts (1)
1-44
: LGTM!The
OffChainLegModel
class is well-structured, with appropriate transformation decorators and a constructor that initializes the model using an existing instance.src/settlements/dto/offchain-leg.dto.ts (1)
1-45
: LGTM!The
OffChainLegDto
class is well-structured, with appropriate validation and transformation decorators. ThetoLeg
method effectively converts the DTO to the expected format.src/settlements/dto/offchain-affirmation-receipt.dto.ts (1)
1-60
: LGTM!The
OffChainAffirmationReceiptDto
class is well-structured, with appropriate validation and transformation decorators. The constructor effectively initializes the DTO using an existing instance.src/settlements/dto/leg.dto.ts (1)
82-86
: Constructor logic is correct.The constructor logic follows best practices and is well-implemented.
src/settlements/settlements.util.ts (1)
Line range hint
50-104
: Function logic is correct.The function logic follows best practices and is well-implemented.
src/settlements/dto/create-instruction.dto.ts (7)
16-40
: Property definition is correct.The
legs
property definition follows best practices and is well-implemented.
Line range hint
42-47
: Property definition is correct.The
tradeDate
property definition follows best practices and is well-implemented.
Line range hint
49-54
: Property definition is correct.The
valueDate
property definition follows best practices and is well-implemented.
Line range hint
56-64
: Property definition is correct.The
endBlock
property definition follows best practices and is well-implemented.
69-78
: Property definition is correct.The
endAfterBlock
property definition follows best practices and is well-implemented.
Line range hint
80-85
: Property definition is correct.The
memo
property definition follows best practices and is well-implemented.
Line range hint
87-92
: Property definition is correct.The
mediators
property definition follows best practices and is well-implemented.src/settlements/models/instruction.model.ts (13)
8-11
: Property definition is correct.The
venue
property definition follows best practices and is well-implemented.
13-16
: Property definition is correct.The
createdAt
property definition follows best practices and is well-implemented.
Line range hint
18-21
: Property definition is correct.The
status
property definition follows best practices and is well-implemented.
Line range hint
23-26
: Property definition is correct.The
tradeDate
property definition follows best practices and is well-implemented.
Line range hint
28-31
: Property definition is correct.The
valueDate
property definition follows best practices and is well-implemented.
Line range hint
33-36
: Property definition is correct.The
type
property definition follows best practices and is well-implemented.
Line range hint
38-43
: Property definition is correct.The
endBlock
property definition follows best practices and is well-implemented.
70-77
: Property definition is correct.The
endAfterBlock
property definition follows best practices and is well-implemented.
Line range hint
79-84
: Property definition is correct.The
eventIdentifier
property definition follows best practices and is well-implemented.
Line range hint
86-89
: Property definition is correct.The
memo
property definition follows best practices and is well-implemented.
93-99
: Property definition is correct.The
legs
property definition follows best practices and is well-implemented.
Line range hint
101-104
: Property definition is correct.The
mediators
property definition follows best practices and is well-implemented.
Line range hint
106-108
: Constructor logic is correct.The constructor logic follows best practices and is well-implemented.
src/settlements/venues.controller.spec.ts (5)
35-48
: Ensure that thegetVenueDetails
method handles errors properly.Consider adding a test case to ensure that the
getVenueDetails
method handles errors from the service correctly.it('should handle errors when fetching venue details', async () => { mockSettlementsService.findVenueDetails.mockRejectedValue(new Error('Error fetching details')); await expect(controller.getVenueDetails({ id: new BigNumber(3) })).rejects.toThrow('Error fetching details'); });
51-71
: Ensure that thecreateVenue
method handles errors properly.Consider adding a test case to ensure that the
createVenue
method handles errors from the service correctly.it('should handle errors when creating a venue', async () => { mockSettlementsService.createVenue.mockRejectedValue(new Error('Error creating venue')); await expect(controller.createVenue(body)).rejects.toThrow('Error creating venue'); });
74-88
: Ensure that themodifyVenue
method handles errors properly.Consider adding a test case to ensure that the
modifyVenue
method handles errors from the service correctly.it('should handle errors when modifying a venue', async () => { mockSettlementsService.modifyVenue.mockRejectedValue(new Error('Error modifying venue')); await expect(controller.modifyVenue({ id: new BigNumber(3) }, body)).rejects.toThrow('Error modifying venue'); });
90-111
: Ensure that thecreateInstruction
method handles errors properly.Consider adding a test case to ensure that the
createInstruction
method handles errors from the service correctly.it('should handle errors when creating an instruction', async () => { mockSettlementsService.createInstruction.mockRejectedValue(new Error('Error creating instruction')); await expect(controller.createInstruction({ id: new BigNumber(3) }, {} as any)).rejects.toThrow('Error creating instruction'); });
4-4
: Consider importingjest-when
as a named import.Importing
jest-when
as a named import can improve readability and consistency with other imports.- import { when } from 'jest-when'; + import { when } from 'jest-when';Likely invalid or redundant comment.
src/test-utils/service-mocks.ts (3)
109-109
: Add a comment for the new mock function.Consider adding a brief comment explaining the purpose of the
fetchOffChainReceipts
mock function for better readability and maintainability.// Mock function to fetch off-chain receipts for an account fetchOffChainReceipts = jest.fn();
162-163
: Add a comment for the new mock functions.Consider adding brief comments explaining the purpose of the
fetchOffChainAffirmations
andfetchOffChainAffirmationForALeg
mock functions for better readability and maintainability.// Mock function to fetch off-chain affirmations for an instruction fetchOffChainAffirmations = jest.fn(); // Mock function to fetch off-chain affirmation status for a specific leg in an instruction fetchOffChainAffirmationForALeg = jest.fn();
174-174
: Add a comment for the new mock function.Consider adding a brief comment explaining the purpose of the
executeInstruction
mock function for better readability and maintainability.// Mock function to execute an instruction executeInstruction = jest.fn();src/settlements/settlements.controller.spec.ts (6)
18-18
: Organize imports alphabetically.Consider organizing the import statements alphabetically for better readability.
import { MockInstruction, MockPortfolio } from '~/test-utils/mocks'; import { MockSettlementsService } from '~/test-utils/service-mocks';
76-81
: Add comments for the new mock legs.Consider adding comments explaining the purpose of the new mock legs for better readability and maintainability.
// Mock leg for off-chain transfer { from: createMock<Identity>({ did: '0x01' }), to: createMock<Identity>({ did: '0x02' }), offChainAmount: new BigNumber(100), asset: 'OFF_CHAIN_TICKER', },
97-113
: Simplify array mapping in the test.Consider simplifying the array mapping for better readability.
legs: mockLegs.data.map(({ from, to, amount, nfts, asset }) => ({ // eslint-disable-next-line @typescript-eslint/no-explicit-any from: createPortfolioIdentifierModel(from as any), // eslint-disable-next-line @typescript-eslint/no-explicit-any to: createPortfolioIdentifierModel(to as any), amount, nfts, asset, })),
244-257
: Add comments for the new test case.Consider adding comments explaining the purpose of the
getOffChainAffirmations
test case for better readability and maintainability.describe('getOffChainAffirmations', () => { it('should return the list of off chain affirmations for an Instruction', async () => { const mockAffirmations = [ { legId: new BigNumber(0), status: AffirmationStatus.Pending, }, ]; mockSettlementsService.fetchOffChainAffirmations.mockResolvedValue(mockAffirmations); const result = await controller.getOffChainAffirmations({ id: new BigNumber(3) }); expect(result).toEqual({ results: mockAffirmations, }); }); });
262-277
: Add comments for the new test case.Consider adding comments explaining the purpose of the
getOffChainAffirmationForLeg
test case for better readability and maintainability.describe('getOffChainAffirmationForLeg', () => { it('should return the off chain affirmation status for a specific leg in an Instruction', async () => { const mockAffirmationStatus = AffirmationStatus.Pending; mockSettlementsService.fetchOffChainAffirmationForALeg.mockResolvedValue( mockAffirmationStatus ); const result = await controller.getOffChainAffirmationForLeg({ id: new BigNumber(3), legId: new BigNumber(0), }); expect(result).toEqual({ legId: new BigNumber(0), status: mockAffirmationStatus, }); }); });
308-319
: Add comments for the new test case.Consider adding comments explaining the purpose of the
executeInstruction
test case for better readability and maintainability.describe('executeInstruction', () => { it('should execute an instruction and return the data returned by the service', async () => { mockSettlementsService.executeInstruction.mockResolvedValue(txResult); const result = await controller.executeInstruction( { id: new BigNumber(3) }, { signer: 'signer' } ); expect(result).toEqual(txResult); }); });src/accounts/accounts.controller.spec.ts (1)
316-325
: Add comments for the new test case.Consider adding comments explaining the purpose of the
getOffChainReceipts
test case for better readability and maintainability.describe('getOffChainReceipts', () => { it('should call the service and return AccountDetailsModel', async () => { const mockResponse = [new BigNumber(1), new BigNumber(2)]; mockAccountsService.fetchOffChainReceipts.mockReturnValue(mockResponse); const result = await controller.getOffChainReceipts({ account: '5xdd' }); expect(result).toEqual({ results: ['1', '2'] }); }); });src/test-utils/mocks.ts (4)
260-261
: Add comments for the new mock functions.Consider adding brief comments explaining the purpose of the
getOffChainAffirmations
andgetOffChainAffirmationForLeg
mock functions for better readability and maintainability.// Mock function to fetch off-chain affirmations for an instruction getOffChainAffirmations = jest.fn(); // Mock function to fetch off-chain affirmation status for a specific leg in an instruction getOffChainAffirmationForLeg = jest.fn();
268-268
: Add a comment for the new mock function.Consider adding a brief comment explaining the purpose of the
generateOffChainAffirmationReceipt
mock function for better readability and maintainability.// Mock function to generate an off-chain affirmation receipt for an instruction generateOffChainAffirmationReceipt = jest.fn();
282-284
: Add comments for the new mock functions.Consider adding brief comments explaining the purpose of the
getAllowedSigners
,addSigners
, andremoveSigners
mock functions for better readability and maintainability.// Mock function to get allowed signers for a venue getAllowedSigners = jest.fn(); // Mock function to add signers to a venue addSigners = jest.fn(); // Mock function to remove signers from a venue removeSigners = jest.fn();
467-467
: Add a comment for the new mock function.Consider adding a brief comment explaining the purpose of the
getOffChainReceipts
mock function for better readability and maintainability.// Mock function to get off-chain receipts for an account getOffChainReceipts = jest.fn();src/accounts/accounts.service.spec.ts (1)
386-399
: LGTM! The test covers the expected functionality.The new test for
fetchOffChainReceipts
is well-implemented and covers the expected functionality.src/settlements/settlements.service.spec.ts (4)
Line range hint
187-231
: LGTM! The test covers the expected functionality.The new test for
createInstruction
is well-implemented and covers the expected functionality.
313-358
: LGTM! The test covers the expected functionality.The new test for
updateVenueSigners
is well-implemented and covers the expected functionality.
Line range hint
368-456
: LGTM! The test covers the expected functionality.The new test for
affirmInstruction
is well-implemented and covers the expected functionality.
557-576
: LGTM! The test covers the expected functionality.The new test for
fetchOffChainAffirmations
is well-implemented and covers the expected functionality.
/* istanbul ignore file */ | ||
|
||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; | ||
import { SignerKeyRingType } from '@polymeshassociation/polymesh-sdk/types'; | ||
import { IsEnum, IsOptional } from 'class-validator'; | ||
|
||
export class OffChainSignatureDto { | ||
@ApiProperty({ | ||
description: 'The keyring type used to sign the off chain receipt', | ||
enum: SignerKeyRingType, | ||
example: SignerKeyRingType.Sr25519, | ||
}) | ||
@IsEnum(SignerKeyRingType) | ||
readonly type: SignerKeyRingType; | ||
|
||
@ApiPropertyOptional({ | ||
description: | ||
'Signature to be used to verify the receipt. If no signature is provided, a signature will be generated using the signer specified along with receipt details', | ||
type: 'string', | ||
example: | ||
'0x12e368f3f697aa51fabf9977244c3531059a23637d05e3122b08259d2127792dc27bc9fe1a12660c0ac74ca4bd520955901d54c76c25e747356c93161654f586', | ||
}) | ||
@IsOptional() | ||
readonly value?: `0x${string}`; | ||
} |
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.
I agree with IsHex validation
// @Type(() => LegModel) | ||
readonly legs: (LegModel | OffChainLegModel)[]; |
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.
I agree here. Possibly declare the union with their own types.
7aa196c
to
00bb502
Compare
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.
Actionable comments posted: 4
Outside diff range and nitpick comments (3)
src/settlements/dto/leg-id-params.dto.ts (1)
1-2
: Consider removing the Istanbul ignore file directive.If the file contains logic that should be tested, consider removing this directive to ensure it is covered by tests.
src/settlements/models/leg.model.ts (1)
44-49
: Clarify the description for thetype
property.The description indicates that the leg is on-chain, but the enum
LegType
can have bothonChain
andoffChain
values.- description: 'Indicates that the leg is on chain', + description: 'Indicates whether the leg is on chain or off chain',src/settlements/settlements.service.spec.ts (1)
187-200
: Remove commented-out code.The commented-out code for creating legs should be removed to maintain code cleanliness.
- // new LegDto({ - // type: LegType.onChain, - // from: new PortfolioDto({ did: 'fromDid', id: new BigNumber(0) }), - // to: new PortfolioDto({ did: 'toDid', id: new BigNumber(1) }), - // amount: new BigNumber(100), - // asset: 'FAKE_TICKER', - // }), - // new OffChainLegDto({ - // type: LegType.offChain, - // from: '0x01', - // to: '0x02', - // offChainAmount: new BigNumber(100), - // asset: 'OFF_CHAIN_TICKER', - // }),
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (36)
- .vscode/settings.json (1 hunks)
- package.json (1 hunks)
- src/accounts/accounts.controller.spec.ts (1 hunks)
- src/accounts/accounts.controller.ts (2 hunks)
- src/accounts/accounts.service.spec.ts (1 hunks)
- src/accounts/accounts.service.ts (2 hunks)
- src/checkpoints/checkpoints.controller.spec.ts (1 hunks)
- src/common/types.ts (1 hunks)
- src/portfolios/dto/portfolio-movement.dto.ts (1 hunks)
- src/settlements/dto/affirm-instruction.dto.ts (1 hunks)
- src/settlements/dto/asset-leg.dto.ts (1 hunks)
- src/settlements/dto/create-instruction.dto.ts (2 hunks)
- src/settlements/dto/create-venue.dto.ts (1 hunks)
- src/settlements/dto/execute-instruction.dto.ts (1 hunks)
- src/settlements/dto/leg-id-params.dto.ts (1 hunks)
- src/settlements/dto/leg.dto.ts (2 hunks)
- src/settlements/dto/offchain-affirmation-receipt.dto.ts (1 hunks)
- src/settlements/dto/offchain-leg.dto.ts (1 hunks)
- src/settlements/dto/offchain-signature.dto.ts (1 hunks)
- src/settlements/dto/update-venue-signers.dto.ts (1 hunks)
- src/settlements/models/asset-leg.model.ts (1 hunks)
- src/settlements/models/created-instruction.model.ts (2 hunks)
- src/settlements/models/instruction.model.ts (4 hunks)
- src/settlements/models/leg.model.ts (2 hunks)
- src/settlements/models/off-chain-affirmation.model.ts (1 hunks)
- src/settlements/models/offchain-leg.model.ts (1 hunks)
- src/settlements/settlements.controller.spec.ts (5 hunks)
- src/settlements/settlements.controller.ts (5 hunks)
- src/settlements/settlements.module.ts (2 hunks)
- src/settlements/settlements.service.spec.ts (8 hunks)
- src/settlements/settlements.service.ts (8 hunks)
- src/settlements/settlements.util.ts (3 hunks)
- src/settlements/venues.controller.spec.ts (1 hunks)
- src/settlements/venues.controller.ts (1 hunks)
- src/test-utils/mocks.ts (3 hunks)
- src/test-utils/service-mocks.ts (3 hunks)
Files skipped from review due to trivial changes (3)
- src/common/types.ts
- src/settlements/dto/asset-leg.dto.ts
- src/settlements/models/asset-leg.model.ts
Files skipped from review as they are similar to previous changes (29)
- .vscode/settings.json
- package.json
- src/accounts/accounts.controller.spec.ts
- src/accounts/accounts.controller.ts
- src/accounts/accounts.service.spec.ts
- src/accounts/accounts.service.ts
- src/checkpoints/checkpoints.controller.spec.ts
- src/portfolios/dto/portfolio-movement.dto.ts
- src/settlements/dto/affirm-instruction.dto.ts
- src/settlements/dto/create-instruction.dto.ts
- src/settlements/dto/create-venue.dto.ts
- src/settlements/dto/execute-instruction.dto.ts
- src/settlements/dto/leg.dto.ts
- src/settlements/dto/offchain-affirmation-receipt.dto.ts
- src/settlements/dto/offchain-leg.dto.ts
- src/settlements/dto/offchain-signature.dto.ts
- src/settlements/dto/update-venue-signers.dto.ts
- src/settlements/models/created-instruction.model.ts
- src/settlements/models/instruction.model.ts
- src/settlements/models/off-chain-affirmation.model.ts
- src/settlements/models/offchain-leg.model.ts
- src/settlements/settlements.controller.spec.ts
- src/settlements/settlements.controller.ts
- src/settlements/settlements.module.ts
- src/settlements/settlements.service.ts
- src/settlements/venues.controller.spec.ts
- src/settlements/venues.controller.ts
- src/test-utils/mocks.ts
- src/test-utils/service-mocks.ts
Additional context used
Path-based instructions (4)
src/settlements/dto/leg-id-params.dto.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/models/leg.model.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/settlements.util.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/settlements/settlements.service.spec.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.
Biome
src/settlements/settlements.util.ts
[error] 44-55: This else clause can be omitted because previous branches break early.
Unsafe fix: Omit the else clause.
(lint/style/noUselessElse)
GitHub Check: Linting
src/settlements/settlements.service.spec.ts
[failure] 15-15:
'LegType' is defined but never used
[failure] 21-21:
'LegDto' is defined but never used
[failure] 23-23:
'OffChainLegDto' is defined but never used
Additional comments not posted (5)
src/settlements/dto/leg-id-params.dto.ts (1)
9-13
: LGTM!The class
LegIdParamsDto
correctly extendsIdParamsDto
and adds thelegId
property with appropriate decorators.src/settlements/models/leg.model.ts (2)
7-8
: LGTM!The import statement for
FromBigNumber
andLegType
is correct.
52-54
: LGTM!The constructor correctly initializes the
LegModel
instance by calling the parent constructor and assigning remaining properties.src/settlements/settlements.util.ts (2)
24-26
: LGTM!The code correctly handles off-chain legs by returning a new
OffChainLegModel
.
101-103
: LGTM!The code correctly handles the
InstructionType.SettleManual
case.
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (2)
- src/settlements/dto/asset-leg.dto.ts (1 hunks)
- src/settlements/settlements.service.spec.ts (8 hunks)
Files skipped from review as they are similar to previous changes (2)
- src/settlements/dto/asset-leg.dto.ts
- src/settlements/settlements.service.spec.ts
- Modifies endpoints 1. `POST venues/create` to support optional property `signers` in the request body (`CreateVenueDto`) to specify list of addresses allowed to sign off chain receipts for instructions of the venue 2. `POST venues/:id/instructions/create` a. to support new optional attribute `endAfterBlock` in request body (`CreateInstructionDto`)to allow creation of instruction that can be executed manually after this given block. b. to add support for off chain legs by adding new optional type `OffChainLegDto` to type of legs 3. `POST instructions/:id/affirm` to support optional attributes `portfolios` and `receipts` in the request body (`AffirmInstructionDto`) to specify specific portfolios to affirm or the details of the off chain leg receipt to be used to affirm off chain legs - Adds new endpoints 1. `POST venues/:id/add-signers` and `POST venues/:id/remove-signers` to add/remove allowed signers from a Venue 2. `GET accounts/:id/receipts` to get all off chain receipts redeemed by an account 3. `GET instructions/:id/offchain-affirmations` to fetch all off chain affirmations status for all off chain legs in an instruction 4. `GET instructions/:id/offchain-affirmations/:legId` to fetch off chain affirmation status for a specific leg in an instruction 5. `POST instructions/:id/execute-manually` to execute an instruction manually
ac06f87
to
48dbdd8
Compare
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (36)
- .vscode/settings.json (1 hunks)
- package.json (1 hunks)
- src/accounts/accounts.controller.spec.ts (1 hunks)
- src/accounts/accounts.controller.ts (2 hunks)
- src/accounts/accounts.service.spec.ts (1 hunks)
- src/accounts/accounts.service.ts (2 hunks)
- src/checkpoints/checkpoints.controller.spec.ts (1 hunks)
- src/common/types.ts (1 hunks)
- src/portfolios/dto/portfolio-movement.dto.ts (1 hunks)
- src/settlements/dto/affirm-instruction.dto.ts (1 hunks)
- src/settlements/dto/asset-leg.dto.ts (1 hunks)
- src/settlements/dto/create-instruction.dto.ts (2 hunks)
- src/settlements/dto/create-venue.dto.ts (1 hunks)
- src/settlements/dto/execute-instruction.dto.ts (1 hunks)
- src/settlements/dto/leg-id-params.dto.ts (1 hunks)
- src/settlements/dto/leg.dto.ts (2 hunks)
- src/settlements/dto/offchain-affirmation-receipt.dto.ts (1 hunks)
- src/settlements/dto/offchain-leg.dto.ts (1 hunks)
- src/settlements/dto/offchain-signature.dto.ts (1 hunks)
- src/settlements/dto/update-venue-signers.dto.ts (1 hunks)
- src/settlements/models/asset-leg.model.ts (1 hunks)
- src/settlements/models/created-instruction.model.ts (2 hunks)
- src/settlements/models/instruction.model.ts (4 hunks)
- src/settlements/models/leg.model.ts (2 hunks)
- src/settlements/models/off-chain-affirmation.model.ts (1 hunks)
- src/settlements/models/offchain-leg.model.ts (1 hunks)
- src/settlements/settlements.controller.spec.ts (5 hunks)
- src/settlements/settlements.controller.ts (5 hunks)
- src/settlements/settlements.module.ts (2 hunks)
- src/settlements/settlements.service.spec.ts (8 hunks)
- src/settlements/settlements.service.ts (8 hunks)
- src/settlements/settlements.util.ts (3 hunks)
- src/settlements/venues.controller.spec.ts (1 hunks)
- src/settlements/venues.controller.ts (1 hunks)
- src/test-utils/mocks.ts (3 hunks)
- src/test-utils/service-mocks.ts (3 hunks)
Files skipped from review due to trivial changes (1)
- src/settlements/models/asset-leg.model.ts
Files skipped from review as they are similar to previous changes (35)
- .vscode/settings.json
- package.json
- src/accounts/accounts.controller.spec.ts
- src/accounts/accounts.controller.ts
- src/accounts/accounts.service.spec.ts
- src/accounts/accounts.service.ts
- src/checkpoints/checkpoints.controller.spec.ts
- src/common/types.ts
- src/portfolios/dto/portfolio-movement.dto.ts
- src/settlements/dto/affirm-instruction.dto.ts
- src/settlements/dto/asset-leg.dto.ts
- src/settlements/dto/create-instruction.dto.ts
- src/settlements/dto/create-venue.dto.ts
- src/settlements/dto/execute-instruction.dto.ts
- src/settlements/dto/leg-id-params.dto.ts
- src/settlements/dto/leg.dto.ts
- src/settlements/dto/offchain-affirmation-receipt.dto.ts
- src/settlements/dto/offchain-leg.dto.ts
- src/settlements/dto/offchain-signature.dto.ts
- src/settlements/dto/update-venue-signers.dto.ts
- src/settlements/models/created-instruction.model.ts
- src/settlements/models/instruction.model.ts
- src/settlements/models/leg.model.ts
- src/settlements/models/off-chain-affirmation.model.ts
- src/settlements/models/offchain-leg.model.ts
- src/settlements/settlements.controller.spec.ts
- src/settlements/settlements.controller.ts
- src/settlements/settlements.module.ts
- src/settlements/settlements.service.spec.ts
- src/settlements/settlements.service.ts
- src/settlements/settlements.util.ts
- src/settlements/venues.controller.spec.ts
- src/settlements/venues.controller.ts
- src/test-utils/mocks.ts
- src/test-utils/service-mocks.ts
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (36)
- .vscode/settings.json (1 hunks)
- package.json (1 hunks)
- src/accounts/accounts.controller.spec.ts (1 hunks)
- src/accounts/accounts.controller.ts (2 hunks)
- src/accounts/accounts.service.spec.ts (1 hunks)
- src/accounts/accounts.service.ts (2 hunks)
- src/checkpoints/checkpoints.controller.spec.ts (1 hunks)
- src/common/types.ts (1 hunks)
- src/portfolios/dto/portfolio-movement.dto.ts (1 hunks)
- src/settlements/dto/affirm-instruction.dto.ts (1 hunks)
- src/settlements/dto/asset-leg.dto.ts (1 hunks)
- src/settlements/dto/create-instruction.dto.ts (2 hunks)
- src/settlements/dto/create-venue.dto.ts (1 hunks)
- src/settlements/dto/execute-instruction.dto.ts (1 hunks)
- src/settlements/dto/leg-id-params.dto.ts (1 hunks)
- src/settlements/dto/leg.dto.ts (2 hunks)
- src/settlements/dto/offchain-affirmation-receipt.dto.ts (1 hunks)
- src/settlements/dto/offchain-leg.dto.ts (1 hunks)
- src/settlements/dto/offchain-signature.dto.ts (1 hunks)
- src/settlements/dto/update-venue-signers.dto.ts (1 hunks)
- src/settlements/models/asset-leg.model.ts (1 hunks)
- src/settlements/models/created-instruction.model.ts (2 hunks)
- src/settlements/models/instruction.model.ts (4 hunks)
- src/settlements/models/leg.model.ts (2 hunks)
- src/settlements/models/off-chain-affirmation.model.ts (1 hunks)
- src/settlements/models/offchain-leg.model.ts (1 hunks)
- src/settlements/settlements.controller.spec.ts (5 hunks)
- src/settlements/settlements.controller.ts (5 hunks)
- src/settlements/settlements.module.ts (2 hunks)
- src/settlements/settlements.service.spec.ts (8 hunks)
- src/settlements/settlements.service.ts (8 hunks)
- src/settlements/settlements.util.ts (3 hunks)
- src/settlements/venues.controller.spec.ts (1 hunks)
- src/settlements/venues.controller.ts (1 hunks)
- src/test-utils/mocks.ts (3 hunks)
- src/test-utils/service-mocks.ts (3 hunks)
Files skipped from review as they are similar to previous changes (34)
- .vscode/settings.json
- package.json
- src/accounts/accounts.controller.ts
- src/accounts/accounts.service.spec.ts
- src/accounts/accounts.service.ts
- src/common/types.ts
- src/portfolios/dto/portfolio-movement.dto.ts
- src/settlements/dto/affirm-instruction.dto.ts
- src/settlements/dto/asset-leg.dto.ts
- src/settlements/dto/create-instruction.dto.ts
- src/settlements/dto/create-venue.dto.ts
- src/settlements/dto/execute-instruction.dto.ts
- src/settlements/dto/leg-id-params.dto.ts
- src/settlements/dto/leg.dto.ts
- src/settlements/dto/offchain-affirmation-receipt.dto.ts
- src/settlements/dto/offchain-leg.dto.ts
- src/settlements/dto/offchain-signature.dto.ts
- src/settlements/dto/update-venue-signers.dto.ts
- src/settlements/models/asset-leg.model.ts
- src/settlements/models/created-instruction.model.ts
- src/settlements/models/instruction.model.ts
- src/settlements/models/leg.model.ts
- src/settlements/models/off-chain-affirmation.model.ts
- src/settlements/models/offchain-leg.model.ts
- src/settlements/settlements.controller.spec.ts
- src/settlements/settlements.controller.ts
- src/settlements/settlements.module.ts
- src/settlements/settlements.service.spec.ts
- src/settlements/settlements.service.ts
- src/settlements/settlements.util.ts
- src/settlements/venues.controller.spec.ts
- src/settlements/venues.controller.ts
- src/test-utils/mocks.ts
- src/test-utils/service-mocks.ts
Additional context used
Path-based instructions (2)
src/accounts/accounts.controller.spec.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.src/checkpoints/checkpoints.controller.spec.ts (2)
Pattern
**/*.ts
: Review the JavaScript code for conformity with the Semi-Standard style guide, highlighting any deviations.
Pattern
**/*.ts
: Analyze the logic of the code and the efficiency of the algorithms used. Suggest improvements if any inefficient algorithms are found.
Additional comments not posted (2)
src/accounts/accounts.controller.spec.ts (1)
316-325
: LGTM! Consider adding more test scenarios.The test case verifies the service call and the returned result. Consider adding more test scenarios to cover edge cases and error handling.
src/checkpoints/checkpoints.controller.spec.ts (1)
Line range hint
321-335
:
LGTM! Consider adding more test scenarios.The test case verifies the service call and the returned result. Consider adding more test scenarios to cover edge cases and error handling.
Quality Gate passedIssues Measures |
/fast-forward |
🎉 This PR is included in version 5.5.0-alpha.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 6.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
JIRA Link
DA-1240, DA-1241, DA-1242, DA-1243, DA-1244, DA-1245, DA-1247
Changelog / Description
Adds multiple endpoints to support off chain legs
Checklist -
Summary by CodeRabbit
New Features
Enhancements
24.7.0-alpha.2
.Tests
Bug Fixes
CheckpointsController
.Documentation