Skip to content

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

Draft
dallasjohnson wants to merge 2 commits intomasterfrom
adding-msig-endpoint
Draft

WIP- Adding MSIG endpoint to get familiar with the API IOC code pattern.#75
dallasjohnson wants to merge 2 commits intomasterfrom
adding-msig-endpoint

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