mirror of
https://github.com/basicswap/basicswap.git
synced 2026-03-19 08:17:25 +01:00
fix
This commit is contained in:
@@ -160,12 +160,14 @@ class FIROInterface(BTCInterface):
|
|||||||
else:
|
else:
|
||||||
# Use automintspark to perform a plain -> spark tx of full balance
|
# Use automintspark to perform a plain -> spark tx of full balance
|
||||||
balance = self.rpc_wallet("getbalance")
|
balance = self.rpc_wallet("getbalance")
|
||||||
print(f"balance {balance} value {value} subfee {subfee}")
|
if str(balance) == str(value):
|
||||||
if str(balance) == str(value) and subfee:
|
|
||||||
result = self.rpc_wallet("automintspark")
|
result = self.rpc_wallet("automintspark")
|
||||||
else:
|
else:
|
||||||
# subtractFee param is not available on plain -> spark transactions
|
# subfee param is available on plain -> spark transactions
|
||||||
params = [{addr_to: {"amount": value}}]
|
mint_params = {"amount": value}
|
||||||
|
if subfee:
|
||||||
|
mint_params["subfee"] = True
|
||||||
|
params = [{addr_to: mint_params}]
|
||||||
result = self.rpc_wallet("mintspark", params)
|
result = self.rpc_wallet("mintspark", params)
|
||||||
# spendspark returns a txid string directly, in a result dict, or as an array
|
# spendspark returns a txid string directly, in a result dict, or as an array
|
||||||
if isinstance(result, list) and len(result) > 0:
|
if isinstance(result, list) and len(result) > 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user