diff --git a/basicswap/__init__.py b/basicswap/__init__.py index 924ead4..002f394 100644 --- a/basicswap/__init__.py +++ b/basicswap/__init__.py @@ -1,3 +1,3 @@ name = "basicswap" -__version__ = "0.11.55" +__version__ = "0.11.56" diff --git a/basicswap/basicswap_util.py b/basicswap/basicswap_util.py index 8ce931f..f8cb7da 100644 --- a/basicswap/basicswap_util.py +++ b/basicswap/basicswap_util.py @@ -458,3 +458,19 @@ def isActiveBidState(state): if state == BidStates.XMR_SWAP_FAILED: return True return False + + +def strSwapType(swap_type): + if swap_type == SwapTypes.SELLER_FIRST: + return 'seller_first' + if swap_type == SwapTypes.XMR_SWAP: + return 'xmr_swap' + return None + + +def strSwapDesc(swap_type): + if swap_type == SwapTypes.SELLER_FIRST: + return 'Secret Hash' + if swap_type == SwapTypes.XMR_SWAP: + return 'Adaptor Sig' + return None diff --git a/basicswap/js_server.py b/basicswap/js_server.py index 05fe6a5..e3f3d25 100644 --- a/basicswap/js_server.py +++ b/basicswap/js_server.py @@ -174,6 +174,7 @@ def js_offers(self, url_split, post_string, is_json, sent=False): ci_from = swap_client.ci(o.coin_from) ci_to = swap_client.ci(o.coin_to) rv.append({ + 'swap_type': o.swap_type, 'addr_from': o.addr_from, 'addr_to': o.addr_to, 'offer_id': o.offer_id.hex(), diff --git a/basicswap/templates/offer.html b/basicswap/templates/offer.html index df08a35..74efcbc 100644 --- a/basicswap/templates/offer.html +++ b/basicswap/templates/offer.html @@ -106,6 +106,10 @@
Swap Type
+