api: Add wallet lock/unlock commands and getcoinseed.

This commit is contained in:
tecnovert committed 2022-11-12 18:22:23 +02:00
1 parent 020a65db8a
commit fc31615a97
21 files changed
+412 -121

No files matched your search

+3
View File
@@ -21,6 +21,7 @@ from basicswap.db import (
def page_automation_strategies(self, url_split, post_string):
server = self.server
swap_client = server.swap_client
swap_client.checkSystemStatus()
summary = swap_client.getSummary()
filters = {
@@ -61,6 +62,7 @@ def page_automation_strategies(self, url_split, post_string):
def page_automation_strategy_new(self, url_split, post_string):
server = self.server
swap_client = self.server.swap_client
swap_client.checkSystemStatus()
summary = swap_client.getSummary()
messages = []
@@ -82,6 +84,7 @@ def page_automation_strategy(self, url_split, post_string):
server = self.server
swap_client = self.server.swap_client
swap_client.checkSystemStatus()
summary = swap_client.getSummary()
messages = []
+2
View File
@@ -37,6 +37,7 @@ def page_bid(self, url_split, post_string):
raise ValueError('Bad bid ID')
server = self.server
swap_client = server.swap_client
swap_client.checkSystemStatus()
summary = swap_client.getSummary()
messages = []
@@ -121,6 +122,7 @@ def page_bid(self, url_split, post_string):
def page_bids(self, url_split, post_string, sent=False, available=False, received=False):
server = self.server
swap_client = server.swap_client
swap_client.checkSystemStatus()
summary = swap_client.getSummary()
filters = {
+4 -1
View File
@@ -319,7 +319,8 @@ def offer_to_post_string(self, swap_client, offer_id):
def page_newoffer(self, url_split, post_string):
server = self.server
swap_client = server.swap_client
swap_client = self.server.swap_client
swap_client.checkSystemStatus()
summary = swap_client.getSummary()
messages = []
@@ -400,6 +401,7 @@ def page_offer(self, url_split, post_string):
offer_id = decode_offer_id(url_split[2])
server = self.server
swap_client = server.swap_client
swap_client.checkSystemStatus()
summary = swap_client.getSummary()
offer, xmr_offer = swap_client.getXmrOffer(offer_id)
ensure(offer, 'Unknown offer ID')
@@ -564,6 +566,7 @@ def page_offer(self, url_split, post_string):
def page_offers(self, url_split, post_string, sent=False):
server = self.server
swap_client = server.swap_client
swap_client.checkSystemStatus()
summary = swap_client.getSummary()
filters = {
+2
View File
@@ -61,6 +61,7 @@ def format_wallet_data(ci, w):
def page_wallets(self, url_split, post_string):
server = self.server
swap_client = server.swap_client
swap_client.checkSystemStatus()
summary = swap_client.getSummary()
page_data = {}
@@ -165,6 +166,7 @@ def page_wallet(self, url_split, post_string):
wallet_ticker = url_split[2]
server = self.server
swap_client = server.swap_client
swap_client.checkSystemStatus()
summary = swap_client.getSummary()
coin_id = getCoinIdFromTicker(wallet_ticker)