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

Refactor transaction related code #979

Open
AnthonyLaw opened this issue Nov 24, 2021 · 0 comments
Open

Refactor transaction related code #979

AnthonyLaw opened this issue Nov 24, 2021 · 0 comments
Labels
Enhancement New feature or request

Comments

@AnthonyLaw
Copy link
Member

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

@cryptoBeliever cryptoBeliever added the Enhancement New feature or request label Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants