fix(frontend): humanize post-sign fee guard errors for retail UI (#371) #897
No reviewers
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!897
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "verify/issue-371-fee-guard-ui-copy"
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
EXTENSION_SIGNED_FEE_UNDERSHOOT_PREFIXthrows to short retail copy (EXTENSION_SIGNED_FEE_USER_MESSAGE) intryHumanizeTerraTxMessageinstead of passthrough.terraBroadcastbypass that surfaced raw guard diagnostics before humanization.docs/frontend.mdand agent playbooks.Verification checklist
npm ci,uluna, Station steps)npx vitest run src/utils/__tests__/humanizeTerraTxError.test.ts -t "GitLab #371"humanizeUserFacingErrorfunnel maps guard thrownpx vitest run src/utils/__tests__/humanizeUserFacingError.test.ts -t "#371"broadcastTerraExecuteContractssurfaces retail copynpx vitest run src/services/terraclassic/__tests__/terraBroadcast.test.ts -t "#371"npx vitest run src/utils/__tests__/extensionSignedFeeGuard.test.tsmake lint-frontendFollow-ups
TxResultAlertrendering (same funnel as unit tests).changed the description
changed the description
Security review
Commit reviewed:
7d3b4aa7c38f5be1b834f5b605df19cfaf32d63bScope: MR !897 — humanize post-sign fee guard errors for retail UI (#371). Reviewed added/modified paths:
extensionSignedFeeGuard.ts,humanizeTerraTxError.ts,terraBroadcast.ts, related tests, and docs.Outcome:
FINDINGS: 0medium+Summary: This change maps verbose
EXTENSION_SIGNED_FEE_UNDERSHOOT_PREFIXdiagnostics to the staticEXTENSION_SIGNED_FEE_USER_MESSAGEand removes theterraBroadcastbypass that previously surfaced raw guard text in the UI. Post-sign fee guard logic and cosmes patch behavior are unchanged.Analysis (no exploitable paths on this diff):
TxResultAlert,ErrorBoundary, toasts) render via React text nodes; nodangerouslySetInnerHTML. Replacing variable diagnostic strings with a fixed constant reduces, not increases, injection surface.ulunaamounts,npm ci, GitLab refs). Full throws remain inconsole.errorupstream — intentional, unchanged.rawLogcontaining the exact prefix would at most show the same retail copy — no auth bypass, fee bypass, or unsafe sink.EXTENSION_SIGNED_FEE_MIN_PERCENTguard, signing envelope, and broadcast error handling semantics are unaffected; only display mapping changed.Inline threads: None (no medium+ findings).
Security review: no medium+ findings on this diff.
added 111 commits
maincc457fb9- Merge branch 'main' into verify/issue-371-fee-guard-ui-copyCompare with previous version
Resolved merge conflicts with
main(commitcc457fb).Conflicts resolved (7 files):
humanizeTerraTxError.ts— aligned onEXTENSION_SIGNED_FEE_UNDERSHOOT_USER_MESSAGEand prefix/exact-message matching from mainterraBroadcast.ts— kept main’s split-sign/recovery imports andisTerraTxTimeoutMessage; fee-guard errors still flow throughtryHumanizeTerraTxMessagehumanizeTerraTxError,humanizeUserFacingError,terraBroadcast) — reconciled #371 assertions with main’s fuller diagnostic stringsdocs/frontend.mdandskills/AGENTS_TERRACLASSIC_GAS.md— merged #371 humanization docs with main’s cosmes-patch SHA-256 and broadcast-recovery updatesSanity checks: vitest
#371tests +extensionSignedFeeGuard.test.ts— all passed.changed the description
Security review
Commit reviewed:
cc457fb9a4bf29a56b056470cd550daae6452e58Scope: MR !897 — humanize post-sign fee guard errors for retail UI (#371). Net diff vs target (
3ece932):extensionSignedFeeGuard.ts(addsEXTENSION_SIGNED_FEE_USER_MESSAGEalias),skills/AGENTS_FRONTEND_USER_ERRORS.md,skills/AGENTS_TERRACLASSIC_GAS.md. Core humanization (tryHumanizeTerraTxMessage,terraBroadcastbypass removal) is already present on the target branch; this MR adds the documented UI constant and playbook rows.Outcome:
FINDINGS: 0medium+Summary: No new exploitable paths. The added constant is a static retail string (duplicate of
EXTENSION_SIGNED_FEE_UNDERSHOOT_USER_MESSAGE); documentation changes have no runtime effect. Existing error surfaces (TxResultAlert,humanizeUserFacingError) render via React text nodes with nodangerouslySetInnerHTML; mapping verbose diagnostics to fixed copy reduces, not increases, XSS and information-disclosure surface. Post-sign fee guard enforcement (EXTENSION_SIGNED_FEE_MIN_PERCENT, cosmes patch) is unchanged.Inline threads: None (no medium+ findings).
Security review: no medium+ findings on this diff.
mentioned in commit
78e3222be9mentioned in issue #371