elixir-omg
elixir-omg copied to clipboard
Use OMG.Bus module as argument instead of calling it directly
In some modules we call OMG.Bus
functions directly and in others, for example OMG.Eth.EthereumHeightMonitor
we pass the OMG.Bus
module as a parameter and call functions using apply
. Let's decide on parameter approach wherever we use the event bus.
As @pnowosie suggested:
Or it might be the opposite: we should pass the bus module
as a param everywhere and mock more on tests as we're moving from integration tests to unit + cabbage
WDYT @InoMurko ❓
Originally posted by @pnowosie in https://github.com/omisego/elixir-omg/pull/1441