Skip to content

feat(frontend): always show the Solana balance changes, and say when they are unknown - #14087

Draft
sbpublic wants to merge 1 commit into
fix/sol-wc-partial-list-warning-textfrom
feat/sol-wc-balance-changes-always-shown
Draft

sbpublic wants to merge 1 commit into
fix/sol-wc-partial-list-warning-textfrom
feat/sol-wc-balance-changes-always-shown

Conversation

@sbpublic

Copy link
Copy Markdown
Collaborator

Motivation

The balance-changes section rendered only when a simulation produced one ({#if nonNullish(preview)}). A request OISY could not simulate therefore showed no balance-changes section at all — and an absent section is indistinguishable from a transaction that moves nothing, which is the most dangerous thing this review can imply.

The codebase already holds this principle for the party lists: the partial-review notice exists because "an empty list reads as an answer rather than as a gap". Balance changes was the one place that still vanished silently, leaving the user to infer the difference from a notice further up the modal.

Stacked on #14086.

Changes

  • Render the section whether or not there is an answer.
  • With a simulation, unchanged — headed Simulated balance changes.
  • Without one, headed Balance changes, since nothing was simulated and the old heading would be a claim of its own. It states that OISY cannot determine which assets the transaction moves or how much, as MessageBox level="error" rather than a warning: it describes a question the review could not answer at all, not something for the user to weigh.
  • New label and message in all 14 shipped locales, generated types refreshed via npm run i18n.
  • PRODUCT.md records that the section is always present and what each heading means.

Tests

  • npx vitest run src/frontend/src/tests/sol — 78 files, 2134 tests
  • npm run check / npm run check:tests — 0 errors
  • npx eslint src/frontend/src/sol src/frontend/src/tests/sol
  • 2 new cases: the section states the unknown answer when there is no simulation, and does not once a simulation answered

Not visually verified — no screenshot of the section in either theme.

🤖 Generated with Claude Code — Claude Opus 5

…they are unknown

The section rendered only when a simulation produced one, so a request
without a simulation showed no balance changes at all - and an absent
section is indistinguishable from a transaction that moves nothing, which
is the most dangerous thing this review can imply. The user was left to
infer the difference from a notice further up.

Render it either way. With an answer it is unchanged, headed `Simulated
balance changes`. Without one it is headed `Balance changes` - nothing was
simulated, so the old heading would be a claim of its own - and states that
OISY cannot determine which assets the transaction moves or how much, as an
error rather than a warning, since it describes a question the review could
not answer at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant