mirror of
https://github.com/basicswap/basicswap.git
synced 2026-06-10 13:01:41 +02:00
Merge branch 'dev' into electrum
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
name = "basicswap"
|
||||
|
||||
__version__ = "0.15.2"
|
||||
__version__ = "0.15.3"
|
||||
|
||||
@@ -13949,6 +13949,27 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
||||
rv["spark_pending"] = (
|
||||
0 if spark_pending_int == 0 else ci.format_amount(spark_pending_int)
|
||||
)
|
||||
elif coin == Coins.FIRO:
|
||||
try:
|
||||
rv["spark_address"] = self.getCachedStealthAddressForCoin(
|
||||
Coins.FIRO
|
||||
)
|
||||
except Exception as e:
|
||||
self.log.warning(
|
||||
f"getCachedStealthAddressForCoin for {ci.coin_name()} failed with: {e}."
|
||||
)
|
||||
# Spark balances are in atomic units, format them
|
||||
rv["spark_balance"] = (
|
||||
0
|
||||
if walletinfo["spark_balance"] == 0
|
||||
else ci.format_amount(walletinfo["spark_balance"])
|
||||
)
|
||||
spark_pending_int = (
|
||||
walletinfo["spark_unconfirmed"] + walletinfo["spark_immature"]
|
||||
)
|
||||
rv["spark_pending"] = (
|
||||
0 if spark_pending_int == 0 else ci.format_amount(spark_pending_int)
|
||||
)
|
||||
|
||||
return rv
|
||||
except Exception as e:
|
||||
|
||||
+12
-12
@@ -55,22 +55,22 @@ PARTICL_VERSION = os.getenv("PARTICL_VERSION", "27.2.3.0")
|
||||
PARTICL_VERSION_TAG = os.getenv("PARTICL_VERSION_TAG", "")
|
||||
PARTICL_LINUX_EXTRA = os.getenv("PARTICL_LINUX_EXTRA", "nousb")
|
||||
|
||||
BITCOIN_VERSION = os.getenv("BITCOIN_VERSION", "29.2")
|
||||
BITCOIN_VERSION = os.getenv("BITCOIN_VERSION", "29.3")
|
||||
BITCOIN_VERSION_TAG = os.getenv("BITCOIN_VERSION_TAG", "")
|
||||
|
||||
LITECOIN_VERSION = os.getenv("LITECOIN_VERSION", "0.21.4")
|
||||
LITECOIN_VERSION_TAG = os.getenv("LITECOIN_VERSION_TAG", "")
|
||||
|
||||
DCR_VERSION = os.getenv("DCR_VERSION", "2.1.2")
|
||||
DCR_VERSION = os.getenv("DCR_VERSION", "2.1.3")
|
||||
DCR_VERSION_TAG = os.getenv("DCR_VERSION_TAG", "")
|
||||
|
||||
NMC_VERSION = os.getenv("NMC_VERSION", "28.0")
|
||||
NMC_VERSION_TAG = os.getenv("NMC_VERSION_TAG", "")
|
||||
|
||||
MONERO_VERSION = os.getenv("MONERO_VERSION", "0.18.4.4")
|
||||
MONERO_VERSION = os.getenv("MONERO_VERSION", "0.18.4.5")
|
||||
MONERO_VERSION_TAG = os.getenv("MONERO_VERSION_TAG", "")
|
||||
XMR_SITE_COMMIT = (
|
||||
"a1bd4cd48a85b6012de20d9e490f83936f477be2" # Lock hashes.txt to monero version
|
||||
"1bfa07c1b54f4f39a93096e3bfb746cb21249422" # Lock hashes.txt to monero version
|
||||
)
|
||||
|
||||
WOWNERO_VERSION = os.getenv("WOWNERO_VERSION", "0.11.3.0")
|
||||
@@ -82,16 +82,16 @@ WOW_SITE_COMMIT = (
|
||||
PIVX_VERSION = os.getenv("PIVX_VERSION", "5.6.1")
|
||||
PIVX_VERSION_TAG = os.getenv("PIVX_VERSION_TAG", "")
|
||||
|
||||
DASH_VERSION = os.getenv("DASH_VERSION", "22.1.3")
|
||||
DASH_VERSION = os.getenv("DASH_VERSION", "23.1.2")
|
||||
DASH_VERSION_TAG = os.getenv("DASH_VERSION_TAG", "")
|
||||
|
||||
FIRO_VERSION = os.getenv("FIRO_VERSION", "0.14.15.0")
|
||||
FIRO_VERSION = os.getenv("FIRO_VERSION", "0.14.15.3")
|
||||
FIRO_VERSION_TAG = os.getenv("FIRO_VERSION_TAG", "")
|
||||
|
||||
NAV_VERSION = os.getenv("NAV_VERSION", "7.0.3")
|
||||
NAV_VERSION_TAG = os.getenv("NAV_VERSION_TAG", "")
|
||||
|
||||
BITCOINCASH_VERSION = os.getenv("BITCOINCASH_VERSION", "28.0.1")
|
||||
BITCOINCASH_VERSION = os.getenv("BITCOINCASH_VERSION", "29.0.0")
|
||||
BITCOINCASH_VERSION_TAG = os.getenv("BITCOINCASH_VERSION_TAG", "")
|
||||
|
||||
DOGECOIN_VERSION = os.getenv("DOGECOIN_VERSION", "23.2.1")
|
||||
@@ -1764,15 +1764,15 @@ def printHelp():
|
||||
|
||||
|
||||
def finalise_daemon(d):
|
||||
logging.info("Interrupting {}".format(d.handle.pid))
|
||||
logging.info(f"Interrupting {d.name} {d.handle.pid}")
|
||||
try:
|
||||
d.handle.send_signal(signal.CTRL_C_EVENT if os.name == "nt" else signal.SIGINT)
|
||||
d.handle.wait(timeout=120)
|
||||
for fp in [d.handle.stdout, d.handle.stderr, d.handle.stdin] + d.files:
|
||||
if fp:
|
||||
fp.close()
|
||||
except Exception as e:
|
||||
logging.info(f"Error {e} for process {d.handle.pid}")
|
||||
for fp in [d.handle.stdout, d.handle.stderr, d.handle.stdin] + d.files:
|
||||
if fp:
|
||||
fp.close()
|
||||
logging.info(f"Error stopping {d.name}, process {d.handle.pid}: {e}")
|
||||
|
||||
|
||||
def test_particl_encryption(data_dir, settings, chain, use_tor_proxy, extra_opts):
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
types: ['default'],
|
||||
hasSubfee: false,
|
||||
hasSweepAll: true
|
||||
},
|
||||
13: {
|
||||
types: ['plain', 'spark'],
|
||||
hasSubfee: true,
|
||||
hasSweepAll: false
|
||||
}
|
||||
},
|
||||
|
||||
@@ -64,6 +69,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (cid === 13) {
|
||||
switch(selectedType) {
|
||||
case 'plain':
|
||||
return this.safeParseFloat(balances.main || balances.balance);
|
||||
case 'spark':
|
||||
return this.safeParseFloat(balances.spark);
|
||||
default:
|
||||
return this.safeParseFloat(balances.main || balances.balance);
|
||||
}
|
||||
}
|
||||
|
||||
return this.safeParseFloat(balances.main || balances.balance);
|
||||
},
|
||||
|
||||
@@ -188,7 +204,8 @@
|
||||
balance: balance,
|
||||
blind: balance2,
|
||||
anon: balance3,
|
||||
mweb: balance2
|
||||
mweb: balance2,
|
||||
spark: balance2
|
||||
};
|
||||
WalletAmountManager.setAmount(percent, balances, coinId);
|
||||
};
|
||||
|
||||
@@ -196,6 +196,17 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% elif w.cid == '13' %} {# FIRO #}
|
||||
<tr class="opacity-100 text-gray-500 dark:text-gray-100 hover:bg-coolGray-200 dark:hover:bg-gray-600">
|
||||
<td class="py-3 px-6 bold"> <span class="inline-flex align-middle items-center justify-center w-9 h-10 bg-white-50 rounded"> <img class="h-7" src="/static/images/coins/{{ w.name }}.png" alt="{{ w.name }} Spark"> </span>Spark Balance: </td>
|
||||
<td class="py-3 px-6 bold">
|
||||
<span class="coinname-value" data-coinname="{{ w.name }}">{{ w.spark_balance }} {{ w.ticker }}</span>
|
||||
(<span class="usd-value"></span>)
|
||||
{% if w.spark_pending %}
|
||||
<span class="inline-block py-1 px-2 rounded-full bg-green-100 text-green-500 dark:bg-gray-500 dark:text-green-500">Pending: +{{ w.spark_pending }} {{ w.ticker }} </span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{# / LTC #}
|
||||
{# / FIRO #}
|
||||
@@ -550,6 +561,15 @@
|
||||
(<span class="usd-value"></span>)
|
||||
</td>
|
||||
</tr>
|
||||
{% elif w.cid == '13' %}
|
||||
{# FIRO #}
|
||||
<tr class="opacity-100 text-gray-500 dark:text-gray-100">
|
||||
<td class="py-4 pl-6 bold w-1/4"> <span class="inline-flex align-middle items-center justify-center w-9 h-10 bg-white-50 rounded"> <img class="h-7" src="/static/images/coins/{{ w.name }}.png" alt="{{ w.name }}"> </span>Spark Balance: </td>
|
||||
<td class="py-3 px-6">
|
||||
<span class="coinname-value" data-coinname="{{ w.name }}">{{ w.spark_balance }} {{ w.ticker }}</span>
|
||||
(<span class="usd-value"></span>)
|
||||
</td>
|
||||
</tr>
|
||||
{% elif w.cid == '1' %}
|
||||
{# PART #}
|
||||
<tr class="opacity-100 text-gray-500 dark:text-gray-100">
|
||||
|
||||
@@ -94,7 +94,7 @@ def format_wallet_data(swap_client, ci, w):
|
||||
wf["spark_address"] = w.get("spark_address", "?")
|
||||
wf["spark_balance"] = w.get("spark_balance", "?")
|
||||
wf["spark_pending"] = w.get("spark_pending", "?")
|
||||
|
||||
|
||||
if hasattr(ci, "getScanStatus"):
|
||||
wf["scan_status"] = ci.getScanStatus()
|
||||
|
||||
@@ -125,7 +125,7 @@ def format_wallet_data(swap_client, ci, w):
|
||||
except Exception:
|
||||
wf["electrum_synced"] = False
|
||||
wf["electrum_height"] = 0
|
||||
|
||||
|
||||
checkAddressesOwned(swap_client, ci, wf)
|
||||
return wf
|
||||
|
||||
|
||||
Reference in New Issue
Block a user