shapeshift / web

ShapeShift Web
https://app.shapeshift.com
MIT License
157 stars 180 forks source link

fix: send modal handle zero and negative amounts gracefully #6930

Closed gomesalexandre closed 1 month ago

gomesalexandre commented 1 month ago

Description

Spotted by @woodenfurniture in https://github.com/shapeshift/web/pull/6876.

🚫 Allows user to send 0 amount 🚫 Allows user to enter negative amount, displays Insufficient Funds:

See this jam for develop and prod repros as well as this PR fixed behavior:

https://jam.dev/c/542c2419-7c78-4339-a27e-77f63666e490

Pull Request Type

Issue (if applicable)

closes N/A, spotted in https://github.com/shapeshift/web/pull/6876.

Risk

High Risk PRs Require 2 approvals

What protocols, transaction types or contract interactions might be affected by this PR?

Low - testing steps to be added. Mostly related to current negative amounts error messaging when sending max with a low UTXO balance

Testing

Engineering

Operations

Screenshots (if applicable)

https://jam.dev/c/542c2419-7c78-4339-a27e-77f63666e490