# Project imports # from settings import settings import util import sources.agora import sources.localbitcoins class Sources(util.Base): """ Class to manage calls to various sources. """ def __init__(self): super().__init__() self.agora = sources.agora.Agora() self.lbtc = sources.localbitcoins.LBTC() def __irc_started__(self): self.agora.setup_loop() self.lbtc.setup_loop() def __xmerged__(self): """ Called when xmerge has been completed in the webapp. Merge all instances into child classes. """ init_map = { "ux": self.ux, "agora": self.agora, "lbtc": self.lbtc, "markets": self.markets, "sinks": self.sinks, "sources": self, "tx": self.tx, "webapp": self.webapp, "money": self.money, "irc": self.irc, "notify": self.notify, } util.xmerge_attrs(init_map) def get_total_wallets(self): """ Get the total crypto in our wallets. """