# DigiDala — Alpha49.5 Changeset (candidate)

## Purpose

Change the internal Pix purchase model from the test direction `1 Star -> 20 Pix` to a configurable rate of `135 Stars -> 1 Pix`, while keeping the Support Mandala cell price at `1 Pix`.

## Scope

- Rename the stored exchange-rate field from `stars_to_pix` to `stars_per_pix`.
- Add migration `009_pix_exchange_rate_direction.sql` and set the current rate to `135 Stars -> 1 Pix`.
- Make the Pix purchase API accept `pixAmount`; the backend calculates the required Stars from the current server-side rate.
- Expose `stars_per_pix` and the allowed purchase amounts `[1, 5, 10, 20, 50]` from the Pix balance endpoint.
- Update the Mini App purchase UI to a compact one-line selector with automatic Stars display.
- Remove the `test` label next to `Внутренняя валюта` and remove the hard-coded `1 ⭐ = 20 pix` UI text.
- Keep `Support.cell_price_pix = 1` unchanged.
- Preserve historical Telegram payment records and existing Pix ledger behavior.
- Add regression coverage for the new rate direction and purchase quote calculation.

## Verification in the prepared source archive

- Structure: OK
- JavaScript syntax: OK
- Unit: 10/10
- Integration: 37/37
- API: 15/15
- Total: 62/62

## Release state

This is a prepared candidate only. It has not been committed, tagged, pushed or deployed from the user's local repository.
