bitkit icon indicating copy to clipboard operation
bitkit copied to clipboard

[Bug]: Unable to spend unconfirmed transactions

Open pwltr opened this issue 1 year ago • 14 comments

Describe the bug

When trying to spend unconfirmed utxos either from the send flow or the channel order flows Bitkit sometimes errors out. The error doesn't appear 100% of the time, when navigating back and forth it sometimes fixes it.

Reproduce

  1. Receive onchain funds
  2. Go to Send or QuickSetup or CustomSetup
  3. Continue
  4. See error

Screenshots / Recording

https://github.com/synonymdev/bitkit/assets/8538369/cc867009-ce15-4840-ac7e-52f79a9e6a72

https://github.com/synonymdev/bitkit/assets/8538369/9c7732b9-e601-4364-b9c6-83f7f50224ee

Screenshot_1711115263

Operating system

iOS/Android

Bitkit version

master

Log output

No response

pwltr avatar Mar 12 '24 13:03 pwltr

@ovitrif can you please have a look about this issue?

JeanlChristophe avatar Mar 14 '24 08:03 JeanlChristophe

@ovitrif can you please have a look about this issue?

Sure thing! Thank you for pinging me ;)

ovitrif avatar Mar 14 '24 08:03 ovitrif

@pwltr Has this occured with a fresh (new) wallet, or one with a bit of transactions history and activity?

ovitrif avatar Mar 14 '24 16:03 ovitrif

@ovitrif This was a completely fresh wallet on regtest. Created a new wallet and received 100k ₿.

pwltr avatar Mar 14 '24 17:03 pwltr

@ovitrif This was a completely fresh wallet on regtest. Created a new wallet and received 100k ₿.

Thanks 🫡

ovitrif avatar Mar 14 '24 17:03 ovitrif

Still can't repro to date

ovitrif avatar Mar 19 '24 18:03 ovitrif

https://github.com/synonymdev/bitkit/assets/46056211/e60196e1-4baf-4168-b94c-80f68e091a3f

v110

JeanlChristophe avatar Mar 20 '24 11:03 JeanlChristophe

So while I can't repro the issue from within the original screen recording, the one about it will exceed half the current input balance I can repro the issues from JC's recordings.

They are different issues AFAICT, actually I could add my recording as well, since it outlines another possible user-facing "error", when the balance is too small, ie. fee is > ½ of it:

https://github.com/synonymdev/bitkit/assets/4588074/77de23aa-ebd6-4ff1-a76e-731a3efa9986

Probably worth mentioning this idea I thought about: since all the errors from above are results of calculations, would it make sense to calculate them 'live' and allow the user to slide/continue through only when having set a "valid" amount?

Or perhaps provide feedback below like we do when spending amount is above 80%, instead of showing it as an error toast after Continue.

Example:

Now After

ovitrif avatar Mar 21 '24 17:03 ovitrif

Logs originating from Beignet when this issue is reproduced relating to onconfirmed utxos

Warp 2024-03-22 001672

ovitrif avatar Mar 22 '24 15:03 ovitrif

I'm only able to reproduce this when switching networks in Settings. An issue was created in beignet here.

Only devs will encounter this issue as they switch networks. Until a fix is applied to the switchNetwork method in beignet, the issue can be remedied by closing and re-opening the app after switching networks.

coreyphillips avatar Mar 23 '24 14:03 coreyphillips

I am still having the same issue with the latest version v111:

  • New wallet
  • TX confirmed
  • Only used mainnet.

https://github.com/synonymdev/bitkit/assets/46056211/4dcef669-f366-4667-9eb8-1d09e79bcac8

JeanlChristophe avatar Mar 27 '24 09:03 JeanlChristophe

This issue is still current with b25c5ada

https://github.com/user-attachments/assets/abd72409-61fd-4440-baed-41feb6d868bd

pwltr avatar Sep 10 '24 10:09 pwltr