2022-03-04 22:47:06 +00:00
|
|
|
# Other library imports
|
|
|
|
# import requests
|
|
|
|
# from json import dumps
|
|
|
|
|
|
|
|
# Project imports
|
|
|
|
# from settings import settings
|
|
|
|
import util
|
|
|
|
import ux.commands
|
2022-07-15 10:09:54 +00:00
|
|
|
import ux.irc
|
2022-03-04 22:47:06 +00:00
|
|
|
import ux.notify
|
2022-04-20 12:01:38 +00:00
|
|
|
import ux.verify
|
2022-03-04 22:47:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
class UX(object):
|
|
|
|
"""
|
|
|
|
Class to manage calls to various user interfaces.
|
|
|
|
"""
|
|
|
|
|
|
|
|
def __init__(self):
|
2022-03-05 21:52:31 +00:00
|
|
|
super().__init__()
|
2022-03-04 22:47:06 +00:00
|
|
|
|
|
|
|
self.irc = ux.irc.bot()
|
|
|
|
self.notify = ux.notify.Notify()
|
2022-04-20 12:01:38 +00:00
|
|
|
self.verify = ux.verify.Verify()
|
2022-03-04 22:47:06 +00:00
|
|
|
|
|
|
|
def __xmerged__(self):
|
|
|
|
"""
|
|
|
|
Called when xmerge has been completed in the webapp.
|
|
|
|
Merge all instances into child classes.
|
|
|
|
"""
|
|
|
|
init_map = {
|
|
|
|
"ux": self,
|
|
|
|
"markets": self.markets,
|
|
|
|
"sinks": self.sinks,
|
2022-03-14 21:19:26 +00:00
|
|
|
"sources": self.sources,
|
2022-03-04 22:47:06 +00:00
|
|
|
"tx": self.tx,
|
|
|
|
"webapp": self.webapp,
|
|
|
|
"money": self.money,
|
|
|
|
"irc": self.irc,
|
|
|
|
"notify": self.notify,
|
2022-04-20 19:47:36 +00:00
|
|
|
"verify": self.verify,
|
2022-05-05 17:16:56 +00:00
|
|
|
"antifraud": self.antifraud,
|
2022-03-04 22:47:06 +00:00
|
|
|
}
|
|
|
|
util.xmerge_attrs(init_map)
|