bug: No balance validation — swap submits amounts exceeding wallet balance #9
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Swap allows submitting amounts larger than wallet balance. TX fails on-chain with overflow error instead of being caught client-side.
Error
Overflow: Cannot Sub with 895770474897 and 1009976018432: execute wasm contract failedExpected
Frontend should check wallet token balance and disable swap button or show error when amount exceeds balance.
Steps to Reproduce
Impact
Bad UX — user wastes gas on a guaranteed-to-fail transaction.
Fix implemented in commit
711f692: the frontend now queries the offer token balance and disables the Swap button with an "Insufficient Balance" message when the entered amount exceeds the wallet balance. Balance is displayed with a Max button. @Brouie please verify when you have a moment.mentioned in commit
711f692c74Verified fixed — swap page now shows INSUFFICIENT BALANCE when amount exceeds wallet balance.
mentioned in issue #1
mentioned in issue #18
mentioned in issue #225
mentioned in merge request !803
mentioned in issue #516