SatoshiPortal / bullbitcoin-mobile

The Bull Bitcoin Mobile Wallet and Exchange App
MIT License
54 stars 18 forks source link

PSBT flow #309

Open BullishNode opened 3 weeks ago

BullishNode commented 3 weeks ago

Overall, the PSBT we are creating is not correct. It is not being recognized by coldcard. We have had this problem in the past implementation.

Tested with 0.2.1-9

Additional comments

  1. PSBT page should be a page and not a pop-up
  2. When creating the PSBT page, the PSBT filename should be displayed on the page.
  3. When downloading the PSBT, I see an error "Coldcard Notice: Wait for a moment for psbt to load into vdisk..." not sure if this is still relevant.
  4. PSBT cannot be downloaded again once it has been downloaded. Should be able to download it an infinite number of times.
  5. If creating another transaction using the same output and same amount as a previous PSBT, but choosing a different feerate, it does not let you download the new PSBT. I think it believes it has already created that same PSBT (it hasnt).
  6. I think it may not be a bad idea to save the psbts, in the same way that we save the swaps. Store them somewhere for later usage.
  7. Scan PSBT qr should be removed until we have standard QR formats. Currently, no HW would be able to scan it.
  8. Once we have both BBQR and Blockchain Commons we should have a toggle between QR formats.
  9. Add a broadcast button direct on the PSBT page

Broadcasting PSBT

I imported a PSBT that was not created from any of the wallets in the app. It said "Unvetified, transaction not found locally" The format of the page should be the same as a traditional transaction page format. It didn't show the fee amount. It didn't show the change output and amount. It didn't show the txhex Also didn't show the PSBT file name.

All of that should be there on the final confirm broadcast page

i5hi commented 3 weeks ago

So this has been my observation:

The psbt we are creating is fine. The airgap flow works seamlessly. All the way through to broadcast.

The vdisk flow seems to have a custom protocol that ensure that file transfer is secure, they seem to do this by requiring encryption and decryption with the public key of the wallet. I have asked Coinkite for a spec and I dont think we will be able to implement this in time for the Press Release - its quite involved and low level. We cannot just use the standard Andrdoid file transfer methods, we have to basically write it ourselves.

Will address all the comments.

There are some issues in broadcasting a local wallets signed.psbt however tx-hex broadcast works just fine. It will show you all the outputs and labels from the unsigned tx if any.

We currently don't support broadcasting a psbt from a wallet not existing in our app, things are a bit tightly coupled but we will fix this.

So, realistically, we can aim for the following by Monday: