Merge pull request #166 from bacoinin/fix_part_balances_checks

Fix part balances checks
This commit is contained in:
tecnovert
2024-11-26 18:37:43 +00:00
committed by GitHub
2 changed files with 24 additions and 4 deletions

View File

@@ -166,7 +166,13 @@ class PARTInterface(BTCInterface):
def getUnspentsByAddr(self):
unspent_addr = dict()
unspent = self.rpc_wallet("listunspent")
balance_type = self.balance_type()
if balance_type == BalanceTypes.PLAIN:
unspent = self.rpc_wallet("listunspent")
elif balance_type == BalanceTypes.BLIND:
unspent = self.rpc_wallet("listunspentblind")
else:
raise ValueError(f"getUnspentsByAddr not implemented for {balance_type} type")
for u in unspent:
if u["spendable"] is not True:
continue