Skip to content

Fix prices missing when products are restored from cache - #458

Merged
ianrumac merged 4 commits into
developfrom
ir/fix/product-name-serde
Sep 7, 2026
Merged

Fix prices missing when products are restored from cache#458
ianrumac merged 4 commits into
developfrom
ir/fix/product-name-serde

Conversation

@ianrumac

@ianrumac ianrumac commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Changes in this pull request

Cached config writes product reference names as product, but the decoder only read reference_name. Restoring config therefore turned names such as offer into empty strings, leaving prices unavailable to named paywall bindings. Accept both fields, preferring the API's reference_name, so existing caches restore correctly without changing the WebView payload.

Adds serialization, request-cache/template, and Android WebView regression tests, plus an Unreleased changelog entry.

Validation

  • Focused JVM tests pass, including config round-trip, same-build refresh, and the full-cache-reset control.
  • Both WebView tests pass on a Pixel 8 emulator running Android 14.
  • Before the fix, three JVM reproduction tests and the cached-config WebView test failed; the latter rendered an empty string instead of €23.99.
  • Emulator coverage uses a minimal price-binding page and fixture prices, not the customer's hosted paywall or RevenueCat integration.
  • New test files pass ktlint. Existing formatting violations remain elsewhere in ProductItem.kt.

Checklist

  • All unit tests pass (focused tests run; full suite not run).
  • All UI tests pass (two focused emulator tests run).
  • Demo project builds and runs (not run).
  • I added/updated tests.
  • I added an entry to CHANGELOG.md.
  • I have run ktlint in the main directory and fixed all issues (new tests pass; pre-existing source issues remain).
  • Documentation considered: no public API changes.
  • I have reviewed the contributing guide.

@ianrumac
ianrumac force-pushed the ir/fix/product-name-serde branch from 43d5d10 to e3c3aa6 Compare September 7, 2026 11:54
@ianrumac
ianrumac merged commit 045582d into develop Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant