Skip to content
This repository was archived by the owner on Apr 22, 2026. It is now read-only.
This repository was archived by the owner on Apr 22, 2026. It is now read-only.

Warn users when post-conditions indicate more spending then possible based on available balance #6180

Description

@314159265359879

When a user is presented with a transaction to sign that has a postcondition to spend more than the available balance (for example STX), we can warn the user that the transaction will likely fail, check if they still want to sign the transaction.

I believe in this case it happened because the dapp checked the STX balance, but not the unlocked balance. It tried to spend about 1200 STX while there was only 92 available/unlocked (total was ~30,000, most of which was stacking).
https://explorer.hiro.so/txid/0xc3e58d2b0f6f8d2437b36ccde7024e2d77f86e66e4851ca329114d6d4becf593?chain=mainnet

The transaction failed
Image

I believe we could have used the post-conditions to warn the user

Image

The user send the same transaction 4 times, likely not understanding what was causing the issue. A warning in Leather could have helped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementenhancement-p3Non-critical functionality wanted by many users, or there are clear alternativesstale

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions