zeitgeist
zeitgeist copied to clipboard
`Market` object is unable to figure out what it's assets are
I would like to add a function which returns the assets belonging to a particular market. IMO This should be a member function of Market
. Problem is that the Market
doesn't know it's ID.
The obvious solution is to add a market_id
field. What bothers me is the mixing of responsiblities. Should a Market
be aware of its ID? I don't think so. I guess the alternative is to add a query to market-commons
? Or add a MarketWithId
which combines MarketId
and Market
into a struct which can then execute the query.