Repository navigation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: badffd6c11
ℹ️ 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".
[Medium impact] This PR appears safe to merge. SummaryUSDT sends over half the USDT balance now name that balance instead of the total balance.
No actionable issues found. Tests were inspected, not run. Reviews (1) · Last reviewed commit: "fix: usdt over-50% warning names the usd..." · Reviewed by Greptile |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Gives USDT sends their own over-50% warning (OVER_HALF_USDT_BALANCE, wallet__send_dialog2_usdt) so the copy names the USDT balance the check actually compares against; bitcoin sends keep OVER_HALF_BALANCE. Reviewed 6b787de, full tier, reasoned from the code (an auto review of bitkit-android does not build the branch here; CI is the gate).
What I checked, and 4 candidates I ruled out
Read: UsdtViewModel.kt (warnings(), confirm(), acceptWarning()), SanityWarning in AppViewModel.kt, both renderers of UsdtSendState.warning (UsdtWalletScreen.kt, PaykitUsdtReview.kt), the new test.
Call sites traced: every SanityWarning.OVER_HALF_BALANCE use; all remaining ones are in the bitcoin send path of AppViewModel, which never sees a USDT quote.
Locales: every values-*/strings.xml that carries wallet__send_dialog2 also carries wallet__send_dialog2_usdt.
CI: build, build-local and lint were still running at review time.
Ruled out
- Confirmed-warning loop:
confirmedWarningsis keyed by the enum value and the USDT path only ever produces the new value, so accepting it once suppresses it on the nextconfirm(). - Paykit USDT review path left on the old copy: it reads the same
UsdtViewModelstate and renderswarning.message, so it picks up the new string too. - E2E selector breaks: the new entry reuses the
SendDialog2test tag listed indocs/e2e-test-ids.md, so a test waiting on that dialog still finds it. formatted="false"changes rendering: the string has no format arguments and is read withstringResource(id), so the attribute only silences the literal%check.
Merge confidence: 4/5, no findings and the new test covers the change, held below 5 because CI had not finished when this was posted.
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
|
Pushed 26d572e: 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 26d572e: 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-ios#1069.
Device gate (partial): 26d572e — 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 (emulator, Pixel 9). Approving; my earlier code scan found no issues.
- USDT send of $15 out of 25.00 USDT: the alert (
SendDialog2) says "over 50% of your USDT balance". - Cancel goes back to Amount with $15 kept. Nothing was sent.
- German: the text fits the dialog with no clipping.
- Yes, send: the alert didn't show again. One USDT send went through ($15.00), no duplicate.
- Bitcoin send of 300,000 out of 499,890 sats: the alert keeps "over 50% of your total balance".
Device gate: 26d572e — 5 checks passed, 0 failed (USDT alert, Cancel, Accept, bitcoin alert, de); l10n: de fits; iOS: pending on synonymdev/bitkit-ios#1069.
Twin: synonymdev/bitkit-ios#1069
Refs: synonymdev/bitkit-ios#1057
Description
SanityWarning.OVER_HALF_USDT_BALANCEon a new key,wallet__send_dialog2_usdt, with translations in every locale; bitcoin sends keepOVER_HALF_BALANCEandwallet__send_dialog2unchanged. The dialog keeps theSendDialog2test tag, so E2E'shandleOver50PercentAlert(tag plus "over 50%") still matches.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
None.
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 — not drivable; see Manual Tests.
Manual Tests
Automated Checks
UsdtViewModelTest.kt— a USDT send over half the USDT balance raises the USDT balance warning