Browse Source

Merge #896: Fix autofreeze warning on Qt

4599bd75a8 Fix autofreeze warning on Qt (Adam Gibson)

Pull request description:

  The autofreeze utxo callback takes a `utxo` as argument, not a utxo string, so convert here in `joinmarket-qt.py`, just as in `WalletService.default_autofreeze_callback`.

ACKs for top commit:
  kristapsk:
    ACK 4599bd75a8, tested before / after, merging.

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

4
scripts/joinmarket-qt.py

@ -1854,12 +1854,14 @@ class JMMainWindow(QMainWindow):
mn_extension = pp_field.text() mn_extension = pp_field.text()
return message_e.toPlainText(), mn_extension return message_e.toPlainText(), mn_extension
def autofreeze_warning_cb(self, utxostr): def autofreeze_warning_cb(self, utxo):
""" Handles coins sent to reused addresses, """ Handles coins sent to reused addresses,
preventing forced address reuse, according to value of preventing forced address reuse, according to value of
POLICY setting `max_sats_freeze_reuse` (see POLICY setting `max_sats_freeze_reuse` (see
WalletService.check_for_reuse()). WalletService.check_for_reuse()).
""" """
success, utxostr = utxo_to_utxostr(utxo)
assert success, "Autofreeze warning cb called with invalid utxo."
msg = "New utxo has been automatically " +\ msg = "New utxo has been automatically " +\
"frozen to prevent forced address reuse:\n" + utxostr +\ "frozen to prevent forced address reuse:\n" + utxostr +\
"\n You can unfreeze this utxo via the Coins tab." "\n You can unfreeze this utxo via the Coins tab."

Loading…
Cancel
Save