payjoin / rust-payjoin

Supercharged payment batching to save you fees and preserve your privacy
https://payjoindevkit.org
82 stars 34 forks source link

Handle response status #284

Closed DanGould closed 3 weeks ago

DanGould commented 4 weeks ago

Oblivious HTTP wraps an HTTP message that contains content and control information. We were ignoring content information like status even though it is essential to the Payjoin V2 protocol. Handle it.

I noticed this issue when trying to send async payjoin. Even if the directory returns a 202 ACCEPTED message to wait for the receiver's proposal, the polling stops because we try to decrypt the content (which is empty, and errors) rather than short circuit the function and return None

DanGould commented 3 weeks ago

Yeah, I was a bit sloppy on my last push trying to rebase on master and missed the serde dependency.

I'm working on #192 which will include a transition to hyper-1.0 transition to fix msrv without the band-aid that is pinning, but it's going to take a little while. Perhaps I'll get it done today 🤞

DanGould commented 3 weeks ago

While #192 does need to be addressed, that's actually not related to this exact problem, which is that reqwest 0.12.5 broke MSRV. I believe my pin is the necessary fix

DanGould commented 3 weeks ago

I removed had the "pin reqwest" commit since it was merged by #294