Repository navigation
fix: usdt over-50% warning names the usdt balance - #1069
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Low impact] The PR appears safe to merge. SummaryThe USDT over-50% warning now names the USDT balance.
No actionable issues found. Static review only; the iOS alert was not run. Acknowledgment: ovitrif explicitly deferred the completed swipe knob behavior to #1064 and broader balance-warning product decisions to separate work. Reviews (1) · Last reviewed commit: "fix: usdt over-50% warning names the usd..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94d40de047
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
talosmachina
left a comment
There was a problem hiding this comment.
No findings. USDT sends over half the USDT balance now show a USDT-specific warning on a new key, wallet__send_dialog2_usdt, so the bitcoin send path keeps wallet__send_dialog2. Reviewed 4a49042, full tier, reasoned from the code (iOS does not build on this reviewer's Linux host).
What I checked, and 3 candidates I ruled out
Read in full: Bitkit/Views/Wallets/UsdtSendView.swift (confirmPayment and the warning alert), the 15 Localizable.strings hunks
Call sites traced: every send_dialog2 reference in Swift. UsdtSendView.swift:705 is the only USDT site, and SendConfirmationView.swift:205 (.balance) still maps the bitcoin path to the unchanged key
Ran: node scripts/validate-translations.js on the head, which reports 0 errors
CI: SwiftFormat, validate and detect-changes green; Run Tests, Run Integration Tests and build-local still pending at review time
Ruled out
- Alert shows the raw key in some locale: all 15
.lprojdirectories gain the key, and the validator agrees. - Re-asking an already confirmed warning:
confirmedWarningsstores the key string thatconfirmPaymentappends, and both sides use the new key, so a confirmed USDT warning is skipped on the second pass the same way the old key was. - Bitcoin copy regression: no Swift site other than
UsdtSendViewwas changed, and the bitcoin message still comes fromwallet__send_dialog2.
Merge confidence: 4/5, a copy change with no findings, but the test and build jobs had not finished at review time.
|
Pushed f69b078: adds the USDT over-50% warning to the manual checklist in |
jvsena42
left a comment
There was a problem hiding this comment.
Code scan at f69b078: no issues found.
- Right balance: the warning compares the quote amount with the USDT wallet balance only, so naming the USDT balance is accurate.
- No math change: the check uses the amount without the fee, the same as master. Fee checks are separate warnings.
- Bitcoin path unchanged: it still uses its own total-balance text.
- Confirmed warnings: accepting once skips the warning on the next confirm, and Cancel behaves as on master.
- E2E: the alert keeps
SendDialog2, and the English text still contains "over 50%". - Translations: the new key is in every locale, and the alert wraps with no fixed-width container.
- Parity: matches synonymdev/bitkit-android#1644.
Device gate (partial): f69b078 — not run yet. Pending:
- on the USDT fixture, send more than half the USDT balance and check the alert names the USDT balance;
- a bitcoin send over half the total, which should keep the total-balance text;
- one long locale (de or ru).
Device results will follow in a separate review.
jvsena42
left a comment
There was a problem hiding this comment.
Device gate passed on the USDT fixture (iPhone 17 simulator). Approving; my earlier code scan found no issues.
- USDT send of 13.00 out of 25.00: the alert reads "over 50% of your USDT balance", with Cancel and Yes, Send.
- Cancel: the alert closes, the knob goes back to the start and nothing is sent. Swiping again shows the alert again.
- Yes, Send opens PIN. After backing out of PIN, a second swipe goes straight to PIN with no second alert. One send of 13.00 went through.
- Bitcoin send of 500,000 and 400,000 out of 763,054 sats via Paste: the alert keeps "over 50% of your total balance".
- German: the text wraps onto three lines and nothing is clipped.
iOS has no SendDialog2 identifier, because the alert is a system alert. The e2e helper matches it by its "over 50%" text, which is still there.
Out of scope, not from this PR: when a second bitcoin: URI opens while the Send sheet is already on Amount, the amount resets to 0. Typing 400,000 sats and swiping then goes straight to PIN with no 50% warning. The same amount via Paste does warn. Repro: run xcrun simctl openurl <udid> "bitcoin:<addr>?amount=0.005" twice, type 400000, Continue, swipe. I'll raise it as a separate issue.
Device gate: f69b078 — 5 checks passed, 0 failed (USDT alert, Cancel, Accept, bitcoin alert, de); l10n: de fits; Android: passed on synonymdev/bitkit-android#1644.
Twin: synonymdev/bitkit-android#1644
Refs: #1057
Description
wallet__send_dialog2_usdt, with translations in every locale; bitcoin sends keepwallet__send_dialog2unchanged.AGENTS.md: rail-specific copy of a shared message gets its own key with the rail as suffix, so later rails follow the same pattern.Docs/USDT-QA.md, since a journey cannot reach it without a funded USDT wallet.Out of Scope
UsdtSendView.swift: the swipe knob while the warning shows, handled in fix: swipe to pay stays done during usdt warnings #1064.Design
N/A — no design available.
Preview
The warning is forced open on the USDT screen with a local debug hook, since the check needs a funded USDT wallet; the dialog and its strings are the real ones. Status bar clock masked.
QA Notes
Journeys
N/A
Manual Tests
Automated Checks
validate-translations.js