feat(payments): wallet screen with balances, benefits and storefront
CI / changes (pull_request) Successful in 3s
CI / unit (pull_request) Successful in 11s
CI / integration (pull_request) Successful in 19s
CI / ui (pull_request) Successful in 1m8s
CI / conformance (pull_request) Successful in 9s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m39s
CI / changes (pull_request) Successful in 3s
CI / unit (pull_request) Successful in 11s
CI / integration (pull_request) Successful in 19s
CI / ui (pull_request) Successful in 1m8s
CI / conformance (pull_request) Successful in 9s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m39s
Add the "Кошелёк" section to the settings hub: context-visible chip balances, active benefits (no-ads term/forever, hints) and a storefront of chip-priced values and money-priced chip packs. Guests have no wallet; the Google Play build hides the money purchases behind a RuStore stub; a web purchase that would draw VK/Telegram chips warns first. Add the catalog read path the storefront needs — a context-projected GET /api/v1/user/wallet/catalog (payments service + store, gateway op wallet.catalog, FBS Catalog/CatalogProduct/CatalogAtom, client decode) — plus the client leg for the existing wallet.get/buy ops. Value spends reuse the existing spend path; the chip-pack purchase (money order flow) arrives with payment intake, so its action is a disabled placeholder for now. Covered by Go unit (catalog projection) + integration (/wallet/catalog over Postgres), vitest (formatting, spendable selection, web-spend warning, GP flag, codec + gateway encode round-trips) and Playwright mock e2e (render, guest-hidden, GP stub, warning) on Chromium + WebKit.
This commit is contained in:
@@ -522,6 +522,25 @@ stops only feedback submission). Roles are listed and granted/revoked on the use
|
||||
message does not mark it read — only the explicit actions do; message bodies and attachments are
|
||||
shown defensively (text escaped, attachments downloaded rather than rendered).
|
||||
|
||||
### Wallet
|
||||
|
||||
Durable players have a **Wallet** — a tab in the Settings hub, between Friends and About; guests have
|
||||
none. It shows their **chips** (the in-game currency, split by where they were funded — VK, Telegram
|
||||
or the web), their **active benefits** (ads off until a date or forever, and the available hint
|
||||
count), and a **store**. What is visible and spendable depends on **where the app runs**, by the
|
||||
store-compliance rules in [`PAYMENTS.md`](PAYMENTS.md): inside a store only that store's chips are
|
||||
usable; on the open web all attached chips are, drawn web → VK → Telegram; on VK-iOS the balance is
|
||||
shown but frozen for spending.
|
||||
|
||||
The **store** lists **values** bought with chips (extra hints, days without ads) at a fixed chip
|
||||
price shown in every context, and **chip packs** bought with real money, priced in the running
|
||||
context's currency (VK Votes, Telegram Stars, or roubles on the web). Buying a value applies its
|
||||
benefit at once. Before a web purchase that would draw VK/Telegram chips, the app **warns** that the
|
||||
benefit will then work only on the web and in the app — a store rule — and asks the player to confirm.
|
||||
On the **Google Play** build the money purchases are hidden behind a note pointing to the RuStore
|
||||
build (Google's in-app-currency rule); spending already-earned chips still works. The wallet keeps
|
||||
**no purchase history** — only the current balances, benefits and store.
|
||||
|
||||
### Advertising banner
|
||||
|
||||
A one-line banner under the nav shows short promotional or operational messages to **free
|
||||
|
||||
Reference in New Issue
Block a user