feat(ui): wallet storefront redesign — split buy/spend, compact balance, exchange confirm
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / ui (pull_request) Successful in 1m11s
CI / conformance (pull_request) Successful in 10s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m55s
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / ui (pull_request) Successful in 1m11s
CI / conformance (pull_request) Successful in 10s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m55s
Reworks the Wallet screen to be more compact and to separate the two flows, and fixes a
reported bug.
Bug: buying a value with too few chips showed the generic "Something went wrong" toast — the
backend's `insufficient_chips` (409) code was propagated correctly but had no i18n mapping, so
`errorKey` fell back to `error.generic`. Add `error.insufficient_chips` / `error.product_not_found`.
Also disable a value's Exchange button up front when the spendable balance cannot cover it (the
server stays authoritative).
Redesign:
- a compact **balance** row leads the screen — the context's own chips (🪙 N) then any linked
other-platform chips behind that platform's logo (monospaced digits); inside a VK/TG store only
that store's own segment shows;
- the benefits section is renamed **Active**, moved above the store, shows one inline line
(hints + ad-free) and hides when nothing is active;
- the **store** splits by a two-way toggle into **Buy chips** (money packs + the watch-an-ad row at
the top) and **Spend chips** (values, exchanged for chips);
- a value's action reads **Exchange** and opens a single confirmation dialog (chip spends are
instant, with no provider window to confirm them); the existing cross-platform store-compliance
warning folds into that same dialog when the spend would draw VK/TG chips.
No payments-model or wire change; the money→chips→values model is unchanged (verified: money buys
only chip packs, values are chips-only — "no-ads for money" is structurally impossible).
Tests: wallet e2e updated for the new layout (chromium + webkit green). Docs: FUNCTIONAL (+_ru)
wallet story rewritten. App bundle budget 126 → 127 KB (always-loaded settings hub).
This commit is contained in:
+10
-8
@@ -228,20 +228,19 @@ export const en = {
|
||||
// --- wallet ---
|
||||
'wallet.title': 'Wallet',
|
||||
'wallet.tab': 'Wallet',
|
||||
'wallet.balance': 'Balance',
|
||||
'wallet.noChips': 'No chips yet',
|
||||
'wallet.source.vk': 'VK',
|
||||
'wallet.source.telegram': 'Telegram',
|
||||
'wallet.source.direct': 'Web',
|
||||
'wallet.viewOnly': 'view only',
|
||||
'wallet.benefits': 'Benefits',
|
||||
'wallet.active': 'Active',
|
||||
'wallet.activeHints': 'Hints: {n}',
|
||||
'wallet.noAdsUntil': 'No ads until {date}',
|
||||
'wallet.noAdsForever': 'No ads forever',
|
||||
'wallet.adsOn': 'Ads are on',
|
||||
'wallet.hints': 'Hints {n}',
|
||||
'wallet.store': 'Store',
|
||||
'wallet.tabBuy': 'Buy chips',
|
||||
'wallet.tabSpend': 'Spend chips',
|
||||
'wallet.empty': 'The store is empty for now',
|
||||
'wallet.buy': 'Buy',
|
||||
'wallet.spend': 'Exchange',
|
||||
'wallet.rewardWatch': 'Watch an ad for {n} 🪙',
|
||||
'wallet.rewardCta': 'Watch',
|
||||
'wallet.rewardCredited': '+{n} 🪙 for watching',
|
||||
@@ -256,10 +255,11 @@ export const en = {
|
||||
'wallet.cur.RUB': '₽',
|
||||
'wallet.cur.VOTE': 'votes',
|
||||
'wallet.cur.XTR': '⭐',
|
||||
'wallet.warnTitle': 'Web-only purchase',
|
||||
'wallet.spendTitle': 'Confirm exchange',
|
||||
'wallet.spendBody': 'Exchange {n} 🪙 for “{title}”?',
|
||||
'wallet.spendConfirm': 'Exchange',
|
||||
'wallet.warnBody':
|
||||
'This spends your VK/Telegram chips, and the benefit will work on the web and in the app only — because of store rules.',
|
||||
'wallet.warnConfirm': 'Continue',
|
||||
'wallet.warnCancel': 'Cancel',
|
||||
'about.title': 'About',
|
||||
'about.tab': 'Info',
|
||||
@@ -313,6 +313,8 @@ export const en = {
|
||||
'error.invalid_email': 'Enter a valid email address.',
|
||||
'error.invalid_config': 'Invalid game settings.',
|
||||
'error.not_found': 'Not found.',
|
||||
'error.insufficient_chips': 'Not enough chips.',
|
||||
'error.product_not_found': 'This item is no longer available.',
|
||||
'error.session_invalid': 'Your session expired. Please sign in again.',
|
||||
'error.unauthenticated': 'Please sign in.',
|
||||
'error.rate_limited': 'Too many requests, slow down.',
|
||||
|
||||
Reference in New Issue
Block a user