ui: Add swap type.

This commit is contained in:
tecnovert
2022-12-18 16:45:07 +02:00
parent fb5e8ff8b1
commit 2a3d89b112
9 changed files with 223 additions and 33 deletions

View File

@@ -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