Skip to content

Refactor transaction related code #979

@AnthonyLaw

Description

@AnthonyLaw

You can see that many common files need to be touched when adding a new transaction. Examples are CreateTransaction.js, TransactionService.js, etc.

It could be possible to have a TransactionTypeHandler interface and a TransactionTypeManager object that controls instances of the interface.

The manager selects the right handler by transaction type (and probably version) and delegates the different methods. Then, adding a new transaction type is just creating a new implementation of TransactionTypeHandler and registering it to the TransactionTypeManager.

I move your comment here, in case i forget :)

CC: @fboucquez

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions