Respect disableoutputsubstitution in payjoin-cli#239
Conversation
disableoutputsubstitutiondisableoutputsubstitution in payjoin-cli
payjoin-cli receiver should not substitute its output address if explicitly disallowed by the sender.
1807b73 to
d0e93e2
Compare
|
This looks correct to me but I wonder if it makes sense to combine separate My concern with such a change is requiring one to go through all the trouble of getting a substitute address, or worse, a channel open contract address, and never using it. I'm inclined to approve what you have and also request the substitute_output_address function is fallable in case output substitution is in fact disabled. The substitution in this implementation is mostly so that a static payjoin-cli server which only posted a single bip21 didn't receive a bunch of payments to one address, so I think this change is appropriate. |
I considered this approach as well but shared your concern about never using a generated address. How about if |
|
This looks like a fix if I've ever seem one 👍 |
As per discussion in #239 (comment), never allow output substitution if `disable_output_substitution` is true.
As per discussion in payjoin/rust-payjoin#239 (comment), never allow output substitution if `disable_output_substitution` is true.
Fix for #238