UI: Invalid bech32 checksum on pair creation surfaces raw contract error to end users #382
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#382
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?
Summary
On
/create, the frontend validates obvious address format failures (wrong prefix, wrong length) with inline errors. However, it does not validate bech32 checksum correctness before submission. A structurally plausible address with an invalid checksum passes the inline guard and reaches the chain, which rejects it with a raw contract error surfaced verbatim to the user.Observed error message (verbatim):
Reproduction steps
/createExpected behavior
The address input should validate bech32 checksum client-side and surface a clear inline error before submission. Example appropriate message:
The raw contract error should never reach the user.
Actual behavior
The invalid checksum address bypasses the inline format guard and the transaction is submitted to the chain. The chain rejects it with a raw developer-facing error string rendered verbatim in the UI.
Environment
/createSeverity: P2(polish) -- submission is blocked but the error copy is raw developer output. Requires a near-valid address to trigger; not a common user path but the output is unacceptable for production.
Related checklist item : CP-5
cc: @PlasticDigits
mentioned in commit
3f9bc007e4mentioned in merge request !911
mentioned in commit
bde8e3807eVerification — GitLab #382 (PASS)
Verified on
mainat mergebde8e380(Validate bech32 checksum on /create token address inputs (#382)).Acceptance criteria
/createtoken fields before submitgetTerraAddressInputErrorusesfromBech32; corruptedterra1…addresses fail checksum gate while passing format regexterraAddressValidation.test.ts,CreatePairPage.test.tsxCreatePairPage.test.tsxasserts button disabledaddr_validate/decoding bech32 failed/execute wasm contract failed) must not reach usershumanizeUserFacingError.test.tsmaps the reported verbatim chain string to retail checksum copy viatryHumanizeTerraTxMessage/createreproduction (valid Token A + corrupted Token B)PLAYWRIGHT_SKIP_CHAIN=1): Simulated Wallet connected →/create→ inline checksum message visible, Create Pair disabled, no raw contract text in DOMdocs/frontend.md§ Create pair — token address validation;skills/AGENTS_FRONTEND_USER_ERRORS.mdcross-linkCommands run
Notes
make test-frontendreports one unrelated failure (cosmesPatch127.test.ts— missing patch file for@goblinhunt/cosmes@0.0.71-ghunt.22); not in scope for #382.Closing as verified on
main.mentioned in issue #291
Verification
At front end, before any tx is carried out, it panics and returns a ui friendly error
Good to go.
mentioned in issue #542
marked as related to #542
mentioned in merge request !1071
mentioned in issue #562
mentioned in issue #593
mentioned in issue #711
mentioned in issue #713