Browse Source

No coins fallback if mixdepth empty

The code prior to this commit incorrectly only chose the
no-coins fallback in PayJoin on receiver side if the call
to wallet.get_utxos_by_mixdepth()[mixdepth] resulted in a
raised exception, but of course it returns an empty dict,
so after this commit the self.no_coins_fallback is called in
case an empty dict is returned; note that the prior case
still resulted in the same behaviour of publishing a non-CJ
transaction, but now the info messages/prompts are clear.
master
AdamISZ 7 years ago
parent
commit
371772f288
No known key found for this signature in database
GPG Key ID: 141001A1AF77F20B
  1. 5
      jmclient/jmclient/maker.py

5
jmclient/jmclient/maker.py

@ -570,9 +570,8 @@ class P2EPMaker(Maker):
except Exception:
# TODO probably not logical to always sweep here.
self.user_info("Sweeping all coins in this mixdepth.")
try:
my_utxos = self.wallet.get_utxos_by_mixdepth()[self.mixdepth]
except:
my_utxos = self.wallet.get_utxos_by_mixdepth()[self.mixdepth]
if my_utxos == {}:
return self.no_coins_fallback()
if not_uih2:
self.user_info("The proposed tx does not trigger UIH2, which "

Loading…
Cancel
Save