Skip to content
Snippets Groups Projects
Commit 00163e92 authored by inso's avatar inso
Browse files

Handle NotEnoughMoneyError

parent cd435424
Branches
Tags
No related merge requests found
......@@ -323,13 +323,15 @@ class Wallet(QObject):
}
transfer = Transfer.initiate(metadata)
self.caches[community.currency]._transfers.append(transfer)
try:
tx = self.prepare_tx(recipient, amount, message, community)
logging.debug("TX : {0}".format(tx.raw()))
tx.sign([key])
logging.debug("Transaction : {0}".format(tx.signed_raw()))
return await transfer.send(tx, community)
except NotEnoughMoneyError as e:
return (False, str(e))
async def sources(self, community):
"""
......
......@@ -139,6 +139,7 @@ class TransferMoneyDialog(QObject):
return
QApplication.setOverrideCursor(Qt.WaitCursor)
result = await self.wallet.send_money(self.account.salt, password, self.community,
recipient, amount, comment)
if result[0]:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment