cake-tech / cake_wallet

The open source repository for Cake Wallet, a noncustodial multi-currency wallet, and Monero.com, a noncustodial Monero-only wallet. Need help? Check out https://guides.cakewallet.com
https://cakewallet.com
MIT License
713 stars 189 forks source link

Payjoin #1806

Open J0J0XMR opened 1 week ago

J0J0XMR commented 1 week ago

This PR is a WIP.

The current bottle neck is that the PSBT being generated throws an error in internal PSBT data structure.

Cake uses PSBTv2 and Payjoin requires v0, so a conversion script is run after building the PSBT. Testing the conversion script on a test PSBTv2 gives a valid v0, so the issue in how the v2 is created in electrum_wallet.dart using createPayjoinTransaction.

Raw hex, PSBT v0 & v2 strings are all printed in debug console for analysis.

Steps to reproduce: 1) Create a PjURI by choosing "Payjoin" option from the drop-down menu on the Receive screen. 2) Copy that PjURI and paste it in the Send form and press Send.

Note: Commits 25ae7c4 & 59ca8b1 include temporary deps and files needed to build and run this branch: