In order to facilitate usage of HTLC we want to use the already existing exchange component and forge an HTLC order book into it.
In order to be able to do that and allow the user to switch between order book types, or even have them visible at once we need to abstract the order book to create an order book factory (design pattern).
[ ] Define an interface (design pattern) that reflects the order book and
[ ] refactor existing logic into one class implementing above interface that consolidate all necessary logic to interact and fetch data from order book (not a component, a simple class)
In order to facilitate usage of HTLC we want to use the already existing exchange component and forge an HTLC order book into it.
In order to be able to do that and allow the user to switch between order book types, or even have them visible at once we need to abstract the order book to create an order book factory (design pattern).
First Step:
This first step may not alter existing logic.