diff --git a/basicswap/basicswap.py b/basicswap/basicswap.py index 1a421ad..1714c96 100644 --- a/basicswap/basicswap.py +++ b/basicswap/basicswap.py @@ -6522,6 +6522,9 @@ class BasicSwap(BaseApp): 'locked': walletinfo['locked'], } + if 'locked_utxos' in walletinfo: + rv['locked_utxos'] = walletinfo['locked_utxos'] + if coin == Coins.PART: rv['stealth_address'] = self.getCachedStealthAddressForCoin(Coins.PART) rv['anon_balance'] = walletinfo['anon_balance'] diff --git a/basicswap/interface/btc.py b/basicswap/interface/btc.py index 2b213c2..1faa1dd 100644 --- a/basicswap/interface/btc.py +++ b/basicswap/interface/btc.py @@ -300,6 +300,7 @@ class BTCInterface(CoinInterface): rv = self.rpc_wallet('getwalletinfo') rv['encrypted'] = 'unlocked_until' in rv rv['locked'] = rv.get('unlocked_until', 1) <= 0 + rv['locked_utxos'] = len(self.rpc_wallet('listlockunspent')) return rv def walletRestoreHeight(self) -> int: diff --git a/basicswap/interface/ltc.py b/basicswap/interface/ltc.py index 4576208..6dc1ddf 100644 --- a/basicswap/interface/ltc.py +++ b/basicswap/interface/ltc.py @@ -33,9 +33,7 @@ class LTCInterface(BTCInterface): return self.rpc_wallet('sendtoaddress', params) def getWalletInfo(self): - rv = self.rpc_wallet('getwalletinfo') - rv['encrypted'] = 'unlocked_until' in rv - rv['locked'] = rv.get('unlocked_until', 1) <= 0 + rv = super(LTCInterface, self).getWalletInfo() mweb_info = self.rpc_wallet_mweb('getwalletinfo') rv['mweb_balance'] = mweb_info['balance'] diff --git a/basicswap/js_server.py b/basicswap/js_server.py index eb9ed5d..6ae75eb 100644 --- a/basicswap/js_server.py +++ b/basicswap/js_server.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2020-2023 tecnovert +# Copyright (c) 2020-2024 tecnovert # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. diff --git a/basicswap/templates/rpc.html b/basicswap/templates/rpc.html index 2d5c861..ead82e3 100644 --- a/basicswap/templates/rpc.html +++ b/basicswap/templates/rpc.html @@ -121,7 +121,7 @@
-