leather-io / extension

Leather browser extension
https://leather.io
MIT License
290 stars 139 forks source link

Transaction rejected on testnet (using Leather) but not with (xverse) nonce not set properly #5529

Closed 314159265359879 closed 1 month ago

314159265359879 commented 1 month ago

Users are running into this issue: image

It turns out the nonce is not properly set by the wallet.

reproduce by creating an offer on beefyswap.io in account 3 (dev) (which is approved)

image

314159265359879 commented 1 month ago

image

This was also displayed at a later moment, Ludo commented "fee estimation failure, and then leather doesn't pick up the text because it prefers json..."

I already ran through some tests with the devs who build the app. It looks related to unreachable API or misinformation from the API.

I would assume if the API to get nextNonce or fee can't be reached to get warning that the wallet may not be able to set the correct nonce/fee.

Rapha-btc commented 1 month ago

failure fetching fee estimation: Estimator RPC endpoint failed to estimate tx ContractCall: No EstimateAvailable

and then leather doesn't pick up the text because it prefers json... Search for the error message in the stacks-core code below:

Solution: create a fall back for this error, IDK? @314159265359879

https://github.com/stacks-network/stacks-core

fbwoolf commented 1 month ago

@alter-eggo is it possible this is bc the Hiro testnet api isn't using old in the mono repo?

https://github.com/leather-wallet/mono/blob/b3a4f22fad064969dc45378c3ba0fb011fe8d588/packages/models/src/network.model.ts#L4

fbwoolf commented 1 month ago

When I test this I can't seem to post using the deprecated old Hiro api, but if we switch to the new (supported) api then no data will migrate. 🤔

Rapha-btc commented 1 month ago

Maybe we should ask Mike. Mike, copying you here—sorry if this isn't relevant, but I heard you mentioned something about the testnet during the call this morning. @radicleart

fbwoolf commented 1 month ago

I believe this will be fixed when we release: https://github.com/leather-wallet/extension/pull/5527

fbwoolf commented 1 month ago

Closing this issue and moving into Ready to release, including here for Monday release: https://github.com/leather-wallet/extension/pull/5530