Browse Source

Merge JoinMarket-Org/joinmarket-clientserver#1174: Don't show nonwallet_custom_change_warning in Qt GUI for non-cj sends

c5456e4a6a Don't show nonwallet_custom_change_warning in Qt GUI for non-cj sends (Kristaps Kaupe)

Pull request description:

  Fixes #1171.

  It was already functioning correctly as expected with `sendpayment.py`, but not in Qt GUI, where in case of unrecognized change address type it showed warning also with maker count being 0 (that's why nobody noticed it before testing #1084).

ACKs for top commit:
  AdamISZ:
    tACK c5456e4a6a

Tree-SHA512: b695d5b16432f29e72e626faba3bdbf3bd4a46678a7c833ed2908d9b93fda8e183c44bc1904d7d600e273c074ad1411dc901100a2c869bab003fc5c25dfe1474
master
Kristaps Kaupe 4 years ago
parent
commit
b0a6ffe2c1
No known key found for this signature in database
GPG Key ID: 33E472FE870C7E5D
  1. 24
      scripts/joinmarket-qt.py

24
scripts/joinmarket-qt.py

@ -1211,21 +1211,21 @@ class SpendTab(QWidget):
if reply == QMessageBox.No: if reply == QMessageBox.No:
return False return False
engine_recognized = True if makercount > 0:
try: engine_recognized = True
change_addr_type = mainWindow.wallet_service.get_outtype( try:
change_addr) change_addr_type = mainWindow.wallet_service.get_outtype(
except EngineError: change_addr)
engine_recognized = False except EngineError:
wallet_type = mainWindow.wallet_service.get_txtype() engine_recognized = False
if (not engine_recognized) or ( wallet_type = mainWindow.wallet_service.get_txtype()
change_addr_type != wallet_type and makercount > 0): if not engine_recognized or change_addr_type != wallet_type:
reply = JMQtMessageBox(self, reply = JMQtMessageBox(self,
nonwallet_custom_change_warning, nonwallet_custom_change_warning,
mbtype='question', mbtype='question',
title="Warning") title="Warning")
if reply == QMessageBox.No: if reply == QMessageBox.No:
return False return False
return True return True

Loading…
Cancel
Save