mirror of
https://github.com/basicswap/basicswap.git
synced 2026-04-09 02:47:22 +02:00
refactor: Rename EventQueue table to Action
This commit is contained in:
@@ -16,7 +16,7 @@ from basicswap.util import (
|
||||
ensure,
|
||||
)
|
||||
from basicswap.db import (
|
||||
strTableTypes,
|
||||
strConcepts,
|
||||
)
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ def page_automation_strategies(self, url_split, post_string):
|
||||
|
||||
formatted_strategies = []
|
||||
for s in swap_client.listAutomationStrategies(filters):
|
||||
formatted_strategies.append((s[0], s[1], strTableTypes(s[2])))
|
||||
formatted_strategies.append((s[0], s[1], strConcepts(s[2])))
|
||||
|
||||
template = server.env.get_template('automation_strategies.html')
|
||||
return bytes(template.render(
|
||||
@@ -93,7 +93,7 @@ def page_automation_strategy(self, url_split, post_string):
|
||||
|
||||
formatted_strategy = {
|
||||
'label': strategy.label,
|
||||
'type': strTableTypes(strategy.type_ind),
|
||||
'type': strConcepts(strategy.type_ind),
|
||||
'only_known_identities': 'True' if strategy.only_known_identities is True else 'False',
|
||||
'data': strategy.data,
|
||||
'note': strategy.note,
|
||||
|
||||
@@ -19,7 +19,7 @@ from .util import (
|
||||
set_pagination_filters,
|
||||
)
|
||||
from basicswap.db import (
|
||||
TableTypes,
|
||||
Concepts,
|
||||
)
|
||||
from basicswap.util import (
|
||||
ensure,
|
||||
@@ -305,7 +305,7 @@ def page_newoffer(self, url_split, post_string):
|
||||
|
||||
automation_filters = {}
|
||||
automation_filters['sort_by'] = 'label'
|
||||
automation_filters['type_ind'] = TableTypes.OFFER
|
||||
automation_filters['type_ind'] = Concepts.OFFER
|
||||
automation_strategies = swap_client.listAutomationStrategies(automation_filters)
|
||||
|
||||
return bytes(template.render(
|
||||
@@ -454,7 +454,7 @@ def page_offer(self, url_split, post_string):
|
||||
|
||||
if offer.was_sent:
|
||||
try:
|
||||
strategy = swap_client.getLinkedStrategy(TableTypes.OFFER, offer_id)
|
||||
strategy = swap_client.getLinkedStrategy(Concepts.OFFER, offer_id)
|
||||
data['automation_strat_id'] = strategy[0]
|
||||
data['automation_strat_label'] = strategy[1]
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user