fix(frontend): extra-debit TaxPreview send_msg leftover after #1267 #1294

Merged
PlasticDigits merged 2 commits from issue/1285 into main 2026-09-21 05:30:03 +00:00

Summary

  • S1285-1 / S1285-2: Swap/Trade build execute-aligned TaxPreview queries (communityTaxPreviewQuery.ts): pair-direct Swap send_msg; router hop uses router→pair with trader and taxPreviewExecuteDebitRaw (declared + hop_trader_debit).
  • S1285-4: Swap TxResultAlert and Trade market submit chrome humanize broadcast errors via humanizeUserFacingErrorFromUnknown (InsufficientForSellTax map).
  • S1285-3: Vitest hook/preview tests + Swap/Trade RTL cases with Honest LCD debit === declared at full balance (submit stays disabled). #1267 local floor remains as fail-closed backstop in extraDebitSubmitGate.

Acceptance criteria (#1285)

Criterion Status
Pair-direct send_msg or documented equivalent Met — wired send_msg; S1267-1 local floor unchanged
Router hop_trader_debit or explicit local floor Met — taxPreviewExecuteDebitRaw + local floor
Vitest LCD shapes (not only debitRaw: null) Met — hook + unit + RTL Honest-debit cases
Inline execute error humanized Met — Swap + Trade market

Validation

  • make verify-issue-1285 (includes make verify-issue-1267 regression)
  • No related open PR existed; head issue/1285 created for reuse.

Gaps

  • Production/runtime logs not consulted (not an incident); VM lacked nvm until $HOME/.cursor-nvm provisioned for Vitest.
  • communityTaxPreviewQuery.test.ts still uses short mock terra1… addresses (resolver only checks prefix); hook tests use valid bech32.

Fixes #1285

## Summary - **S1285-1 / S1285-2:** Swap/Trade build execute-aligned `TaxPreview` queries (`communityTaxPreviewQuery.ts`): pair-direct `Swap` `send_msg`; router hop uses router→pair with `trader` and `taxPreviewExecuteDebitRaw` (`declared + hop_trader_debit`). - **S1285-4:** Swap `TxResultAlert` and Trade market submit chrome humanize broadcast errors via `humanizeUserFacingErrorFromUnknown` (`InsufficientForSellTax` map). - **S1285-3:** Vitest hook/preview tests + Swap/Trade RTL cases with Honest LCD `debit === declared` at full balance (submit stays disabled). `#1267` local floor remains as fail-closed backstop in `extraDebitSubmitGate`. ## Acceptance criteria (#1285) | Criterion | Status | |-----------|--------| | Pair-direct `send_msg` or documented equivalent | **Met** — wired `send_msg`; S1267-1 local floor unchanged | | Router `hop_trader_debit` or explicit local floor | **Met** — `taxPreviewExecuteDebitRaw` + local floor | | Vitest LCD shapes (not only `debitRaw: null`) | **Met** — hook + unit + RTL Honest-debit cases | | Inline execute error humanized | **Met** — Swap + Trade market | ## Validation - `make verify-issue-1285` (includes `make verify-issue-1267` regression) - No related open PR existed; head `issue/1285` created for reuse. ## Gaps - Production/runtime logs not consulted (not an incident); VM lacked nvm until `$HOME/.cursor-nvm` provisioned for Vitest. - `communityTaxPreviewQuery.test.ts` still uses short mock `terra1…` addresses (resolver only checks prefix); hook tests use valid bech32. Fixes #1285
fix(frontend): execute-aligned TaxPreview and humanize extra-debit tx errors
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
f19ba133fb
Wire pair Swap send_msg and router hop_trader_debit into preview debit, humanize Swap/Trade broadcast errors, and extend Vitest/RTL for Honest LCD shapes (Fixes #1285).
Author
Owner

drain skip: no occupying job for rebase/fix-pr/CI-wait; remaining continue

drain skip: no occupying job for rebase/fix-pr/CI-wait; remaining continue
Merge remote-tracking branch 'origin/main' into issue/1285
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
9409b3002a
PlasticDigits deleted branch issue/1285 2026-09-21 05:30:04 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!1294
No description provided.