diff --git a/basicswap/interface/part.py b/basicswap/interface/part.py index 8129343..9e572c1 100644 --- a/basicswap/interface/part.py +++ b/basicswap/interface/part.py @@ -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 @@ -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,