leather-io / desktop

Manage STX tokens and Stacking
https://leather.io/
192 stars 71 forks source link

Resolve nonce issues with new mempool nonces from API? #1193

Open Hero-Gamer opened 1 year ago

Hero-Gamer commented 1 year ago

A. Sent 1 tx successfully with correct nonce B. Tried sending 2nd tx afterwards, in preview window it says the same nonce as the 1st transaction, when it should be plus 1. Reinstalling to latest version doesn't fix it. Waiting minutes closing re-opening the desktop app doesn't fix it.

What is the issue, has this issue always been in the app?

Hero-Gamer commented 1 year ago

about 15~20 minutes later, the 1st tx still "in mempool" spinning status, now if I attempt the 2nd tx the nonce is set correctly.

314159265359879 commented 1 year ago

This bug is still in version 4.10.0 of the wallet image

markmhendrickson commented 1 year ago

This new API support for getting mempool nonces seems promising for improving our nonce calculations: https://github.com/hirosystems/stacks-blockchain-api/pull/1633

@fbwoolf wdyt since it appears you were the one that submitted the API-side issue that led to this PR last fall?

Presumably it'd help both in the desktop and extension versions.

fbwoolf commented 1 year ago

hirosystems/stacks-blockchain-api#1633

Yeah, I think we should try to use. We do it ourselves using pending transactions query, but would help to know what the api sends us.

314159265359879 commented 9 months ago

We get reminded now and again that this bug is still in the current wallet.

It can take upto 10 minutes before the desktop wallet updates the next nonce after a transaction is send. On the extension this behavior is much better (takes less time to update).

Hero-Gamer commented 9 months ago

I waited more than 10 minutes this time before new tx is able to recognize the correct next nonce.

314159265359879 commented 9 months ago

Resolving this issue will not get prioritized yet. We have revamping the desktop wallet on our roadmap for Q2 2024, this will likely have to wait until that time.

Note that the team is focusing on improving support in hardware/Ledger mode and building the mobile version of Leather at the moment. Some of that work also involves making choices that benefit the desktop wallet later.