Use native payment asset labels in UI - #122
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 165431f5b4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| accessMode === 'classic' | ||
| ? `${priceDot} DOT` | ||
| ? `${priceDot} ${nativePaymentSymbol}` |
There was a problem hiding this comment.
Update the artist-publish test to expect PAS
In the Playwright artist-publish scenario, this review panel now renders 0.75 PAS after the configured Paseo chain resolves, but web/e2e/artist-publish.spec.ts still requires 0.75 DOT at lines 84 and 105. Consequently the deterministic publishing test times out both while reviewing the draft and while checking the published catalog card; update those assertions from the same native-payment symbol fixture used by the Classic test.
AGENTS.md reference: AGENTS.md:L29-L30
Useful? React with 👍 / 👎.
| ## Pre-PR alignment check | ||
|
|
||
| <!-- | ||
| List the official dependency/SDK version checks performed before opening this PR, | ||
| any drift found, codebase improvements worth considering, and how the change | ||
| fits Dotify's product north star. |
There was a problem hiding this comment.
Move the pre-PR governance additions out of this ticket
This native-payment-label ticket also imposes new dependency-currency, improvement, and philosophical checks on every future PR, with matching unrelated edits to the knowledge-sharing guide. That process-policy change is independent of the payment UI behavior and substantially broadens the active ticket, so move it to its own backlog scope rather than coupling it to this fix.
AGENTS.md reference: AGENTS.md:L99-L103
Useful? React with 👍 / 👎.
|
Addressed review feedback in 0d699d5:
Validation: npm run test:e2e -- e2e/artist-publish.spec.ts; npm run lint; npm run build. |
Outcome
Dotify no longer displays hard-coded DOT labels across the Classic unlock and artist payment UI. Payment amounts now use the native runtime asset resolved from the connected EVM chain, so Product DevNet/Paseo surfaces display PAS while DOT-backed chains can display DOT.
Issue and context
Refs #85. PR #121 made Classic unlock intents explicitly carry the native runtime asset, but several user-facing components still rendered price strings as DOT. That was misleading on the current Product DevNet/Paseo rail, where the runtime-native token label is PAS.
This PR keeps the money boundary unchanged: pricePlanck remains the authoritative payment amount, Classic unlock still submits msg.value through RuntimeWritePort, and CASH remains unsupported until PCF/Product confirms a settlement receipt or bridge model.
Architecture and key concepts
The catalog hook already resolves nativeRuntimePaymentAsset from the connected chain. This PR exposes that asset through CatalogProvider consumers and threads the symbol into presentational surfaces that render Classic prices.
Runtime flow:
UI resolves EVM chain -> nativeRuntimePaymentAsset -> catalog/player/studio labels -> Classic payment intent -> RuntimeWritePort -> musicRoyPayAccess(contentHash) + msg.value.
No contract, backend, CORS, Fly, Netlify, or env setting changes are included.
How it works
Design decisions and tradeoffs
I did not rename priceDot or formatWeiAsDot in this PR. Those names are historical and wider than the display bug: they touch API shapes, track types, artist publish, mocks, and tests. The safer scope is to make visible labels honest now, then handle semantic renaming in a dedicated compatibility PR.
I did not update Product SDK dependencies here. The official npm snapshot shows drift and audit risk, but changing SDK/PAPI versions would materially broaden this UI-label PR.
Security, failure, and operations
Authoritative payment amount remains pricePlanck when available; display strings do not drive settlement. Unknown chain metadata falls back to the existing native asset fallback, and this PR does not introduce any frontend secrets or deployment configuration.
No deployment configuration update is required: no env vars, origins, Fly, Netlify, mounts, scaling, or runtime settings changed.
Review guide
Suggested order
Verify carefully
Validation
Known limitations and follow-ups
Pre-PR alignment check
Metadata checklist