Skip to content

fix(MO-1069): reduce contested-username fee from 0.2 to 0.1 DASH - #1580

Closed
abaranouski wants to merge 1 commit into
fix/upgrade-memory-and-syncfrom
feat/MO-1069
Closed

abaranouski wants to merge 1 commit into
fix/upgrade-memory-and-syncfrom
feat/MO-1069

Conversation

@abaranouski

@abaranouski abaranouski commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Draft — verification gaps, please read before reviewing

  • The one automated test that asserts this fix's user-visible behavior never ran its assertion. org.dash.DashPayIdentityTest#testCreateUsernameShowsUpdatedContestedFee (in abaranouski/dashwallet-auto, branch feat/MO-1067) soft-skipped both runs (20:34 and 20:40 UTC) at [SKIP] Create username screen not reachable — the 0.15/0.25 fee-text assertion never executed. Root cause looks pre-existing and unrelated to this diff (a More-screen locator pinned to android.widget.TextView that misses when Compose renders the row as android.view.View — see dashwallet-auto's own CLAUDE.md "Known tricky areas"). No regressions were observed (0 failures/errors both runs), but there is no positive confirmation the UI shows 0.15 DASH.
  • Open question: confirm 0.15 DASH is indeed the intended new total contested fee (0.20→0.10 DASH prefunded-voting-balance reduction per the ticket), and confirm no platform-version-gated fee lookup is expected for this ticket (the app has no existing fee version-gating mechanism; adding one would be a much larger change than this constant correction).
  • Recommended path to a green verification: fix the More-screen locator in dashwallet-auto (swap to the class-agnostic OnboardingActivityPage.composeButtonByText helper already used elsewhere in that repo for this exact issue) and re-run DashPayIdentityTest so the fee assertion actually executes — or do a one-device manual pass (steps below) before merging.

Opening as draft so this is visible before review rather than blocking on a refusal.

What changed

Platform v4.2 lowers the prefunded voting balance a contested-username (DPNS) registration debits from 0.2 DASH to 0.1 DASH, so the total contested cost drops from 0.25 to 0.15 DASH.

Single source of truth: wallet/src/de/schildbach/wallet/Constants.java

  • DASH_PAY_FEE_CONTESTED: 0.25 → 0.15
  • DASH_PAY_FEE_CONTESTED_NAME: 0.20 → 0.10

Every validation message, balance check, transaction-submission amount, and the identity top-up amount in the transparent (L1) create/top-up path reads these constants symbolically (CreateIdentityService.kt, TopUpRepository.kt, SdkTransparentUsernameCreation.kt, RequestUserNameViewModel.kt, ConfirmUserNameDialogViewModel.kt, invite screens) — no independent hardcoding — so this two-constant edit directly fixes the ticket's flagged risk: the app can no longer size a top-up for the old 0.2 DASH fee (the "surplus applied as a larger top-up to the identity" the ticket calls out).

Also corrected a stale comment above SHIELDED_USERNAME_FUND_MIN that no longer holds post-change.

Deliberately left unchanged (verified, not overlooked): the shielded/private path uses a fixed Drive-consensus exit-denomination set (0.03/0.1/0.25/0.5/1.0 DASH); both the old (0.2) and new (0.15) fee round up to the same 0.25 DASH bucket, so SHIELDED_USERNAME_FUND_MIN_CONTESTED (0.26 DASH) and the shielded/invite modules need no edits.

Tests

  • Updated RequestUserNameViewModelTest.kt's checkUsernameValid_dashSource_freshlyFundedWallet_passes_contested, which pinned the transparent-path requirement as the literal "0.25" — now "0.15". Unit suite: 50/50 passing (:wallet:test_testNet3DebugUnitTest).
  • Full ./gradlew compile/test could not run in this environment (missing local.properties/service.properties/google-services.json); verified instead by tracing every consumer of the two changed constants.
  • On-device automation: see the draft note above — exists, wired, but did not reach its assertion this run.

Testing notes for QA

One device, no cross-wallet interaction needed:

  1. On a build carrying this commit, open the create-username screen for a contested (<20 char) username with an under-funded wallet.
  2. Expected: balance-requirement/validation text reads 0.15 DASH (not 0.25).
  3. Proceed through identity creation with a contested username; confirm the top-up amount reflects the new 0.1 DASH prefunded-voting balance (not 0.2) — no surplus top-up.
  4. Regression check: shielded/invite fee flows still show 0.26 DASH funding guidance (unchanged, expected).

Related

  • Test coverage: DashPayIdentityTest#testCreateUsernameShowsUpdatedContestedFee already exists in abaranouski/dashwallet-auto on branch feat/MO-1067 (this ticket clones MO-1067, and the fee values are numerically identical — no new test was written or committed for MO-1069, so no test PR was opened this run). No PR currently covers that branch; whether it merges to main before or alongside this PR is an open question for the reviewer.
  • Ticket: https://dashpay.atlassian.net/browse/MO-1069

🤖 Сгенерировано DC Cockpit — MO-1069 · Push and open the pull requests · статус прогона, стадии, артефакты и логи

Platform v4.2 lowered the prefunded voting balance a contested DPNS
registration debits from 0.2 to 0.1 DASH. Update the two Constants.java
source-of-truth values (DASH_PAY_FEE_CONTESTED 0.25->0.15,
DASH_PAY_FEE_CONTESTED_NAME 0.20->0.10) that every balance check,
validation message, transaction-submission amount and top-up
calculation in the transparent (L1) create/top-up path derives from,
so the app can no longer misapply the old fee's surplus as an
oversized identity top-up.

The shielded/private path is unaffected: its Type-20 exit-denomination
set is a fixed Drive consensus value independent of this app-side fee,
and 0.15 DASH still rounds up to the same 0.25 DASH denomination 0.2
did, so no shielded constant changes.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thepastaclaw

Copy link
Copy Markdown
Contributor

🕓 Review not started yet because this PR is a draft.

  • Request normal review — click when the PR is ready for review.
  • Request priority review — click to move this review to the front of the queue.

Commit 48fc53e. Normal review starts when eligible; priority review starts as soon as a slot is available.

@andreika-baranouski

Copy link
Copy Markdown
Contributor

Closing: this run's covering test never executed its assertion (soft-skip), so the fix was not verified. MO-1069 will be rerun from scratch with the test fixed and screenshots as evidence.

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.

4 participants