coins: Update valid Firo swap types.
This commit is contained in:
parent
6a26f72bca
commit
65c93eaee6
@ -256,9 +256,9 @@ class BasicSwap(BaseApp):
|
|||||||
self._is_locked = None
|
self._is_locked = None
|
||||||
|
|
||||||
# TODO: Set dynamically
|
# TODO: Set dynamically
|
||||||
self.scriptless_coins = (Coins.XMR, Coins.PART_ANON)
|
self.scriptless_coins = (Coins.XMR, Coins.PART_ANON, Coins.FIRO)
|
||||||
self.adaptor_swap_only_coins = self.scriptless_coins + (Coins.PART_BLIND, )
|
self.adaptor_swap_only_coins = self.scriptless_coins + (Coins.PART_BLIND, )
|
||||||
self.coins_without_segwit = (Coins.PIVX, Coins.DASH, Coins.FIRO, Coins.NMC)
|
self.coins_without_segwit = (Coins.PIVX, Coins.DASH, Coins.NMC)
|
||||||
|
|
||||||
# TODO: Adjust ranges
|
# TODO: Adjust ranges
|
||||||
self.min_delay_event = self.settings.get('min_delay_event', 10)
|
self.min_delay_event = self.settings.get('min_delay_event', 10)
|
||||||
|
@ -219,6 +219,7 @@ chainparams = {
|
|||||||
'message_magic': 'DarkNet Signed Message:\n',
|
'message_magic': 'DarkNet Signed Message:\n',
|
||||||
'blocks_target': 60 * 1,
|
'blocks_target': 60 * 1,
|
||||||
'decimal_places': 8,
|
'decimal_places': 8,
|
||||||
|
'has_cltv': True,
|
||||||
'has_csv': False,
|
'has_csv': False,
|
||||||
'has_segwit': False,
|
'has_segwit': False,
|
||||||
'use_ticker_as_name': True,
|
'use_ticker_as_name': True,
|
||||||
@ -296,7 +297,8 @@ chainparams = {
|
|||||||
'message_magic': 'Zcoin Signed Message:\n',
|
'message_magic': 'Zcoin Signed Message:\n',
|
||||||
'blocks_target': 60 * 10,
|
'blocks_target': 60 * 10,
|
||||||
'decimal_places': 8,
|
'decimal_places': 8,
|
||||||
'has_csv': True,
|
'has_cltv': False,
|
||||||
|
'has_csv': False,
|
||||||
'has_segwit': False,
|
'has_segwit': False,
|
||||||
'mainnet': {
|
'mainnet': {
|
||||||
'rpcport': 8888,
|
'rpcport': 8888,
|
||||||
|
@ -575,8 +575,8 @@ function lookup_rates_table() {
|
|||||||
|
|
||||||
|
|
||||||
function set_swap_type_enabled(coin_from, coin_to, swap_type) {
|
function set_swap_type_enabled(coin_from, coin_to, swap_type) {
|
||||||
const adaptor_sig_only_coins = ['6' /* XMR */, '8' /* PART_ANON */, '7' /* PART_BLIND */];
|
const adaptor_sig_only_coins = ['6' /* XMR */, '8' /* PART_ANON */, '7' /* PART_BLIND */, '13' /* FIRO */];
|
||||||
const secret_hash_only_coins = ['11' /* PIVX */, '12' /* DASH */, '13' /* FIRO */];
|
const secret_hash_only_coins = ['11' /* PIVX */, '12' /* DASH */];
|
||||||
let make_hidden = false;
|
let make_hidden = false;
|
||||||
if (adaptor_sig_only_coins.includes(coin_from) || adaptor_sig_only_coins.includes(coin_to)) {
|
if (adaptor_sig_only_coins.includes(coin_from) || adaptor_sig_only_coins.includes(coin_to)) {
|
||||||
swap_type.disabled = true;
|
swap_type.disabled = true;
|
||||||
|
@ -191,15 +191,17 @@ class Test(BaseTest):
|
|||||||
(Coins.BTC, Coins.XMR, SwapTypes.XMR_SWAP),
|
(Coins.BTC, Coins.XMR, SwapTypes.XMR_SWAP),
|
||||||
(Coins.XMR, Coins.BTC, SwapTypes.XMR_SWAP),
|
(Coins.XMR, Coins.BTC, SwapTypes.XMR_SWAP),
|
||||||
(Coins.BTC, Coins.FIRO, SwapTypes.XMR_SWAP),
|
(Coins.BTC, Coins.FIRO, SwapTypes.XMR_SWAP),
|
||||||
(Coins.FIRO, Coins.BTC, SwapTypes.SELLER_FIRST),
|
|
||||||
(Coins.BTC, Coins.FIRO, SwapTypes.SELLER_FIRST),
|
|
||||||
(Coins.FIRO, Coins.BTC, SwapTypes.XMR_SWAP),
|
(Coins.FIRO, Coins.BTC, SwapTypes.XMR_SWAP),
|
||||||
|
(Coins.PIVX, Coins.BTC, SwapTypes.SELLER_FIRST),
|
||||||
|
(Coins.BTC, Coins.PIVX, SwapTypes.SELLER_FIRST),
|
||||||
]
|
]
|
||||||
should_fail = [
|
should_fail = [
|
||||||
(Coins.BTC, Coins.XMR, SwapTypes.SELLER_FIRST),
|
(Coins.BTC, Coins.XMR, SwapTypes.SELLER_FIRST),
|
||||||
(Coins.XMR, Coins.PART_ANON, SwapTypes.XMR_SWAP),
|
(Coins.XMR, Coins.PART_ANON, SwapTypes.XMR_SWAP),
|
||||||
(Coins.FIRO, Coins.PART_ANON, SwapTypes.XMR_SWAP),
|
(Coins.FIRO, Coins.PART_ANON, SwapTypes.XMR_SWAP),
|
||||||
(Coins.PART_ANON, Coins.FIRO, SwapTypes.XMR_SWAP),
|
(Coins.PART_ANON, Coins.FIRO, SwapTypes.XMR_SWAP),
|
||||||
|
(Coins.FIRO, Coins.BTC, SwapTypes.SELLER_FIRST),
|
||||||
|
(Coins.BTC, Coins.FIRO, SwapTypes.SELLER_FIRST),
|
||||||
]
|
]
|
||||||
|
|
||||||
for case in should_pass:
|
for case in should_pass:
|
||||||
|
Loading…
Reference in New Issue
Block a user