mirror of
https://github.com/basicswap/basicswap.git
synced 2024-12-22 19:49:20 +00:00
getUnspentsByAddr correclty retrieves unspent blind utxos
This commit is contained in:
parent
3e3a83e6d4
commit
9386544b3d
1 changed files with 8 additions and 2 deletions
|
@ -166,7 +166,13 @@ class PARTInterface(BTCInterface):
|
|||
|
||||
def getUnspentsByAddr(self):
|
||||
unspent_addr = dict()
|
||||
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
|
||||
|
@ -968,7 +974,7 @@ class PARTInterfaceBlind(PARTInterface):
|
|||
return bytes.fromhex(lock_refund_swipe_tx_hex)
|
||||
|
||||
def getSpendableBalance(self) -> int:
|
||||
return self.make_int(self.rpc_wallet("getbalances")["mine"]["blind_trusted"])
|
||||
raise ValueError("getUnspentsByAddr is used to get the Blind balances")
|
||||
|
||||
def publishBLockTx(
|
||||
self,
|
||||
|
|
Loading…
Reference in a new issue