Skip to main content

KIOSK-254 — Pages to Apply USD Wallet Wording Changes

FieldValue
Task IDKIOSK-254
GoalAlign USD Wallet transaction names and financial labels across 3 operational portals
In scopekioskgaming_admin, kioskgaming_superagent, kioskgaming_agent, shared UI packages/ui (portal-usd-wallet, portal-ledger)
Out of scope (v1)Shop portal (kioskgaming_shop), route URL changes (/online-transactions), internal variable/API renames (onlineBalanceNet, fetchAgentOnlineBalanceLedger), DB schema
RelatedFinance System · Admin USD wallet detail view · Task-kiosk-260 (correction / reversal / refund labels on Admin)

1. Background

In the codebase, USD Wallet (usd_wallets + usd_wallet_transactions) is the real-money (USD) wallet used to buy credit, receive settlement deposits, and withdraw crypto. However, the UI still has many legacy names:

Legacy termIssue
Online balanceDoes not match product name; users do not know this is "USD Wallet"
Online transactions (Agent nav)Differs from Super Agent / page title ("USD wallet transactions")
Online balance top up / withdrawal (Shop utils)Shop only — out of scope for KIOSK-254 but same pattern to avoid spreading to in-scope portals

Ticket goal: one unified vocabulary — prioritize "USD wallet" / "USD Wallet" for product name and balance descriptions; transaction labels shared from @kioskgaming/ui when possible.


2. Wording conventions (source of truth)

2.1 Product name & balance

ContextStandard label (EN)Do not use
Wallet name / sidebar / dashboard cardUSD walletOnline balance, online USD balance
Available balanceCurrent USD balance or USD wallet balanceOnline balance, USD online balance
Main ledger pageUSD wallet transactionsOnline transactions
Page descriptionTrack USD wallet ledger activity, balances, and withdrawal requests.Online balance ledger…
WithdrawalRequest withdrawal / USD withdrawalOnline balance withdrawal
Buy credit from USDConvert USD wallet balance to credits / USD converted to creditsConvert online balance…

Capitalization: Nav / page title → sentence case (USD wallet transactions). Short badge / card heading → USD wallet. Modal title may use USD Wallet as proper noun (timeline step).

2.2 Transaction type labels (ledger table & detail)

Shared from packages/ui/src/portal-usd-wallet/ledgerUtils.ts (usdLedgerTypeLabel) and portal-ledger/usdTransactionPresentation.ts (buildUsdBusinessView):

Signal (type / ref)List / table labelDetail modal title
depositDepositUSD added to wallet
withdrawal (payout)WithdrawUSD withdrawal
purchase_credits / balance_to_creditsPurchase creditsUSD converted to credits
adjustment creditBalance Correction — CreditWallet adjustment
adjustment debitBalance Correction — DebitWallet adjustment
reversalTransaction ReversalWallet activity reversed
Refund flowsRefund(Admin: displayLabel from API — see KIOSK-260)
FallbackUSD wallet activityUSD wallet activity

Admin list/detail: Prefer displayLabel / displayCategory from API (usdLedgerEnrichment) when available — do not duplicate heuristics on frontend. See Task-kiosk-260.

2.3 Status labels (unchanged — already aligned)

Completed · Pending · Processing · Failed · Cancelled — from usdLedgerStatusLabel.


3. Scope — change table by portal

3.1 Admin Portal (kioskgaming_admin)

Page / AreaRoute / fileCurrent (gap)Required change
Nav / route meta/usd-wallets · routes.tsxNav title: USD WalletsKeep or change to USD wallet transactions if product wants parity with other portals; unify breadcrumb
USD wallet ledgerusdWallets/index.tsxTitle already USD wallet transactionsReview toast/export: USD ledger exported → optionally USD wallet ledger exported
Ledger detail modalUsdWalletLedgerDetailModal.tsx · UsdWalletActivityView.tsxSome copy uses "online balance", "online USD"Change to USD wallet / USD wallet balance (see §3.1 copy table)
Agent detail — balance cardagents/AgentDetailPage.tsxUSD walletKeep; Gross net sublabel unchanged
Super Agent detailsuperAgents/SuperAgentDetailPage.tsxUSD wallet balanceKeep
Shop detailagents/ShopDetailPage.tsxUSD walletKeep
Finance correction modalfinance/FinanceCorrectionDebitModal.tsxUSD online balance, USD (online balance)USD wallet balance / USD wallet
Super Agent withdrawal limitsSuperAgentPortalWithdrawalLimitsCard.tsxOnline balance withdrawal limits (USD)USD wallet withdrawal limits
Payment transaction detailtransactions/TransactionDetails.tsxpaid online USD balancepaid from USD wallet / used USD wallet balance
Cash flow timelineutils/transactionCashFlowTimeline.tsUSD Wallet, USD wallet movementKeep; ensure leg labels match buildUsdBusinessView
Credit wallet cross-refCreditWalletActivityView.tsxUSD wallet transactionKeep
Provider fees tableproviderFees/providerFeesColumns.tsxUSD wallet · internal transferKeep

Admin activity copy — specific replacements (UsdWalletActivityView.tsx):

Old patternNew pattern
converted online balance toconverted USD wallet balance to
used online USD to buyused USD wallet balance to buy
(copy already using "USD wallet")Keep

3.2 Super Agent Portal (kioskgaming_superagent)

Page / AreaRoute / fileCurrent (gap)Required change
Sidebar navAppLayout.tsx · /online-transactionsUSD wallet transactionsKeep
BreadcrumbsuperAgentBreadcrumb.tsUSD wallet transactionsKeep
Ledger pageOnlineBalanceTransactionsPage.tsxPage title USD wallet transactionsReview hook toast: Could not load online balance ledgerUSD wallet ledger
DashboardDashboardPage.tsxCard USD wallet + link USD wallet transactionsKeep
Sidebar balanceAppLayout.tsxCurrent USD balanceOptionally change to USD wallet balance to match Admin Super Agent detail
Credit purchaseCreditPurchaseModal.tsx · CreditPurchaseTrigger.tsxonline USD balance, Insufficient online balance, Use online USD balanceUSD wallet balance / Insufficient USD wallet balance
Managed shop walletManagedShopWalletHistoryPanel.tsxTab label USD wallet, empty No USD wallet transactions yetKeep
Credit / USD tx listAgentTransactionsPage.tsxUses UsdWalletTransactionDetailModal from UI packageLabels from shared package (§4)
Provider feesproviderFees/MethodCell.tsxUSD wallet · internal transferKeep
Hooks / errorsuseSuperAgentOnlineBalanceLedger.tsCould not load online balance ledgerCould not load USD wallet ledger

3.3 Agent Portal (kioskgaming_agent)

Page / AreaRoute / fileCurrent (gap)Required change
Sidebar navAppLayout.tsx · /online-transactionsOnline transactionsUSD wallet transactions (match Super Agent + page title)
Ledger pageOnlineBalanceTransactionsPage.tsxTitle USD wallet transactionsSync nav (above)
Sidebar balanceAppLayout.tsxCurrent USD balanceOptional: USD wallet balance
Shop detail — tabShopDetailPageRedesign.tsxTab USD wallet txUSD wallet transactions (or USD wallet if space constrained)
Shop detail — sectionShopDetailPageRedesign.tsxSubtitle Online balance (USD wallet) ledger entriesUSD wallet ledger entries
Shop detail — empty/loadingShopDetailPageRedesign.tsxLoading USD transactions…, No USD transactions yetUSD wallet transactions
Credit purchaseCreditPurchaseModal.tsx · CreditPurchaseTrigger.tsxSame as Super Agent — online balanceUSD wallet balance
Provider feesproviderFees/MethodCell.tsxUSD wallet · internal transferKeep
Hooks / errorsuseAgentOnlineBalanceLedger.tsCould not load online balance ledgerCould not load USD wallet ledger

4. Shared UI package (packages/ui)

Agent + Super Agent (+ partial Admin list) share this module. Fix once → all 3 portals benefit (except Admin-specific detail).

ModuleMain fileWording to review
portal-usd-walletledgerUtils.tsusdLedgerTypeLabel, usdPartyDisplayLabel, summary grid
PortalUsdWalletSummaryGrid.tsxCurrent USD balance, Available for withdrawal
PortalUsdWalletLedgerTable.tsxColumn headers: Owner, Type, Status, Balance before/after (net)…
PortalWithdrawalLimitsPanel.tsxWithdrawal limit copy
portal-ledgerusdTransactionPresentation.tsMany places use online USD balance / online balance → change to USD wallet (balance)
UsdWalletTransactionDetailModal.tsxTitle from buildUsdBusinessView
cashFlowTimelineSample.tsSample Online balanceUSD wallet

4.1 usdTransactionPresentation.ts — target copy

FieldCurrentChange to
summaryLine (B2C)…from your online balance into credits…from your USD wallet into credits
subtitle (deposit)Your online USD balance increasedYour USD wallet balance increased
subtitle (withdrawal)…from your online USD balance…from your USD wallet
subtitle (generic)…affected your online USD balance…affected your USD wallet balance
balanceRows labelTotal debited from USD WalletKeep (already correct)

5. Implementation architecture

┌─────────────────────────────────────────────────────────────┐
│ packages/ui │
│ portal-usd-wallet/ledgerUtils.ts │
│ portal-ledger/usdTransactionPresentation.ts │
└───────────────────────────┬─────────────────────────────────┘
│ import @kioskgaming/ui
┌───────────────────┼───────────────────┐
▼ ▼ ▼
kioskgaming_agent kioskgaming_superagent kioskgaming_admin
(nav, hooks, (hooks, credit (usdWalletLedgerUtils,
shop detail, purchase copy) ActivityView, finance modal)
credit purchase)

Suggested order:

  1. UI package — transaction detail + type labels (K254-UI-1)
  2. Agent + Super Agent — nav, hooks, credit purchase, shop detail (K254-AG-1, K254-SA-1)
  3. Admin — remaining "online balance" + finance/super-agent cards (K254-AD-1)
  4. QC grep — no user-facing online balance on 3 in-scope apps (K254-QC-1)

Do not change in this task: hook name useAgentOnlineBalanceLedger, endpoint online-balance, API field online_balance_net — only change display strings.


6. Implementation plan (reviewable tasks)

IDTaskRepoSize
K254-UI-1Replace online balance / online USD strings in usdTransactionPresentation.ts + testspackages/uiS
K254-UI-2Review ledgerUtils.ts + PortalUsdWalletSummaryGrid (if USD wallet balance label needed)packages/uiXS
K254-SA-1Super Agent: credit purchase copy + hook error toastkioskgaming_superagentXS
K254-AG-1Agent: nav label, shop detail subtitles, credit purchase, hook toastkioskgaming_agentS
K254-AD-1Admin: UsdWalletActivityView, FinanceCorrectionDebitModal, SuperAgentPortalWithdrawalLimitsCard, TransactionDetailskioskgaming_adminS
K254-QC-1Grep gate + QC checklist (§7)allXS

KIOSK-260 dependency: Admin badge Refund / Balance Correction from API displayLabel — K254 does not change classification logic; only ensure narrative text uses "USD wallet" instead of "online balance".


7. Test plan (QC)

7.1 Agent — nav consistency

  1. Login to Agent portal.
  2. Sidebar item /online-transactions shows USD wallet transactions (no longer "Online transactions").
  3. Page header uses same wording.

7.2 Shared detail modal

  1. Open a Purchase credits row on Agent or Super Agent.
  2. Modal: title USD converted to credits; body contains no "online balance".

7.3 Withdrawal flow copy

  1. Open Request withdrawal modal.
  2. Label Current USD balance / validation message uses USD wallet terminology.

7.4 Admin finance correction

  1. Open finance correction debit modal, select USD wallet.
  2. No option label USD (online balance).

7.5 Shop detail (Agent)

  1. Agent → Shop detail → USD tab.
  2. Subtitle USD wallet ledger entries; empty state No USD wallet transactions yet.

7.6 Regression grep (automatable)

# User-facing strings — expect 0 matches in src/ (allow comments & API field names)
rg -i 'online balance' kioskgaming_admin/src kioskgaming_agent/src kioskgaming_superagent/src packages/ui/src \
--glob '!**/*.test.*'

Allowed exceptions: code comments, variable name onlineBalanceNet, JSDoc @param onlineBalance.


8. Acceptance criteria

  • AC-1: All three portals use the same page name USD wallet transactions for the main ledger (nav + header).
  • AC-2: No user-facing "online balance" / "online transactions" (Agent nav) on in-scope surfaces.
  • AC-3: Detail modal & shared ledger labels use USD wallet (balance) instead of legacy online wording.
  • AC-4: Admin entity cards (agent / super agent / shop) still show USD wallet balance — no regression.
  • AC-5: Transaction type labels consistent between list table and detail modal (shared package).

9. File index (quick lookup)

PortalFiles
Sharedpackages/ui/src/portal-usd-wallet/ledgerUtils.ts, PortalUsdWalletSummaryGrid.tsx, packages/ui/src/portal-ledger/usdTransactionPresentation.ts
AdminusdWallets/index.tsx, UsdWalletActivityView.tsx, usdWalletLedgerUtils.ts, finance/FinanceCorrectionDebitModal.tsx, superAgents/SuperAgentPortalWithdrawalLimitsCard.tsx, transactions/TransactionDetails.tsx, agents/*DetailPage.tsx, agents/ShopDetailPage.tsx
Super Agentpages/OnlineBalanceTransactionsPage.tsx, components/layout/AppLayout.tsx, components/credits/CreditPurchase*.tsx, hooks/useSuperAgentOnlineBalanceLedger.ts, components/shops/ManagedShopWalletHistoryPanel.tsx
Agentpages/OnlineBalanceTransactionsPage.tsx, pages/ShopDetailPageRedesign.tsx, components/layout/AppLayout.tsx, components/credits/CreditPurchase*.tsx, hooks/useAgentOnlineBalanceLedger.ts

10. Definition of done

  • All AC (§8) pass on staging.
  • packages/ui build + Agent/Super Agent/Admin consume new UI version.
  • Grep gate §7.6 pass (with documented allowlist).
  • PR description links this doc + notes overlap with KIOSK-260 if same release.

11. Notes for PM / copywriter

If Jira KIOSK-254 has a more detailed Required change table (per deposit/settlement/payout scenario), add new rows to §3 — this doc maps from codebase inventory when ticket image detail is unavailable.

Labels Balance Correction / Transaction Reversal / Refund belong to KIOSK-260; KIOSK-254 only covers USD Wallet product name and online → USD wallet narrative, not correction taxonomy.