Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP- Adding MSIG endpoint to get familiar with the API IOC code pattern. #75

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dallasjohnson
Copy link

Work in progress to create an endpoint for the MSIGs.
I wanted to try to get through the process to know if the community would be able to contribute to the code.

This endpoint works but I'm sure I've broken the pattern in some places.

@dallasjohnson dallasjohnson requested a review from rkamysz August 22, 2023 13:14
* The `MSIGAggregateRecord` class is responsible for creating an aggregated record that contains information about a MSIGProposal
* and its related data.
*/
export class MSIGAggregateRecord {
Copy link

Choose a reason for hiding this comment

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

I would consider it as an entity not a model. this is not bad but the model should be simple and we are thinking to get rid of the models in the domain (in that form).

*
* @class
*/
export class Proposal implements Entity {
Copy link

Choose a reason for hiding this comment

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

Filename is plural and should be singular like class name

@inject(GetAllMSIGSUseCase.Token)
private getAllMSIGSUseCase: GetAllMSIGSUseCase,
@inject(CreateAggregatedMSIGRecords.Token)
private createAggregatedMSIGRecords: CreateAggregatedMSIGRecords
Copy link

Choose a reason for hiding this comment

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

missing UseCase in the name

* @class
*/
@injectable()
export class CreateAggregatedMSIGRecords
Copy link

Choose a reason for hiding this comment

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

Missing UseCase

@@ -0,0 +1,31 @@
import { Transaction } from '../use-cases/get-decoded-msig-txn.use-case';
Copy link

Choose a reason for hiding this comment

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

Importing type from the use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants