Add bid intent messages.

This commit is contained in:
tecnovert
2023-07-05 23:35:25 +02:00
parent 00bebfa371
commit f6fb11f452
23 changed files with 1231 additions and 633 deletions

View File

@@ -480,7 +480,7 @@ class XMRInterface(CoinInterface):
except Exception as e:
return {'error': str(e)}
def getSpendableBalance(self):
def getSpendableBalance(self) -> int:
with self._mx_wallet:
self.openWallet(self._wallet_filename)
@@ -514,3 +514,7 @@ class XMRInterface(CoinInterface):
def isAddressMine(self, address):
# TODO
return True
def ensureFunds(self, amount):
if self.getSpendableBalance() < amount:
raise ValueError('Balance too low')