diff --git a/openfut-adapter-fifa17/src/fut/store_catalog.rs b/openfut-adapter-fifa17/src/fut/store_catalog.rs index 7693c13..3319cc3 100644 --- a/openfut-adapter-fifa17/src/fut/store_catalog.rs +++ b/openfut-adapter-fifa17/src/fut/store_catalog.rs @@ -207,9 +207,13 @@ pub fn pack_body(p: &PackDef, idx: u64, owned: bool) -> Value { }); let obj = body.as_object_mut().expect("pack body is a JSON object"); if owned { - // Reward/My-Packs tiles have no purchase path; drop the coin row so the - // client never formats an unavailable payment label as literal "undefined". - obj.remove("currencies"); + // Reward/My-Packs tiles KEEP the coins currency at the pack price (0 for + // reward packs). My Packs opens through the store purchase flow, so a tile + // with no currency row is not actionable — clicking navigates instead of + // opening. With a free coin row the client sends POST /purchased and the + // server (owned-only) opens it for free. No extPrice (that is the `or %1s` + // mtx bug), so the free coin row formats as "0", not an unavailable label. + // LIVE-PROVEN 2026-08-18: a reward Silver Pack opened and revealed cards. obj.insert( "displayGroup".into(), json!({ "value": "mypacks", "priority": idx }), @@ -242,6 +246,9 @@ pub fn sentinel_body(idx: u64) -> Value { .expect("sentinel body is a JSON object"); obj.insert("state".into(), json!("active")); obj.insert("unopened".into(), json!(false)); + // The sentinel must stay non-openable (it is only a resolve-without-crash shim + // for an empty My Packs), so it keeps no purchase path. + obj.remove("currencies"); body } diff --git a/openfut-adapter-fifa17/tests/fixtures/purchasegroup_pack70.json b/openfut-adapter-fifa17/tests/fixtures/purchasegroup_pack70.json index 218d8a5..db4c3dc 100644 --- a/openfut-adapter-fifa17/tests/fixtures/purchasegroup_pack70.json +++ b/openfut-adapter-fifa17/tests/fixtures/purchasegroup_pack70.json @@ -212,6 +212,13 @@ "isPremium": false, "sortPriority": 1, "displayGroupAssetId": 3, + "currencies": [ + { + "name": "coins", + "funds": 0, + "finalFunds": 0 + } + ], "packContentInfo": { "bronzeQuantity": 0, "silverQuantity": 0,