Browse Source

Merge #1183: Return TransactionFailed when insufficient funds

a0b7b38 Return TransactionFailed when insufficient funds (Adam Gibson)
master
Adam Gibson 4 years ago
parent
commit
d3069a8b46
No known key found for this signature in database
GPG Key ID: 141001A1AF77F20B
  1. 4
      jmclient/jmclient/wallet_rpc.py

4
jmclient/jmclient/wallet_rpc.py

@ -20,7 +20,7 @@ from jmclient import Taker, jm_single, \
create_wallet, get_max_cj_fee_values, \
StorageError, StoragePasswordError, JmwalletdWebSocketServerFactory, \
JmwalletdWebSocketServerProtocol, RetryableStorageError, \
SegwitWalletFidelityBonds, wallet_gettimelockaddress
SegwitWalletFidelityBonds, wallet_gettimelockaddress, NotEnoughFundsException
from jmbase.support import get_log, utxostr_to_utxo
jlog = get_log()
@ -546,6 +546,8 @@ class JMWalletDaemon(Service):
return_transaction=True, answeryes=True)
except AssertionError:
raise InvalidRequestFormat()
except NotEnoughFundsException as e:
raise TransactionFailed(repr(e))
if not tx:
# this should not really happen; not a coinjoin
# so tx should go through.

Loading…
Cancel
Save