You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed
A store build whose store cannot transact no longer shows "Restore purchases" or a store purchase button. The store gate (offersStorePurchase, and canPurchaseViaStore with it) checked only that the build has a store rail, and on iOS and Android Payments.store is non-null whether or not the RevenueCat key is set. So a consuming app's Android build, whose catalogue names App Store ids only and whose key was blank, offered a team owner "Restore purchases", and the tap failed with "Purchases are not set up in this app yet." The gate now also refuses when the catalogue on screen names no product, grandfathered ones included, with an id in this store, and when the price read fails with BillingErrorCode.notConfigured. magic_payments raises that code for a blank key and for any store configuration error RevenueCat reports, a slow StoreKit fetch included, so a later price read that succeeds gives the controls back; any other price failure leaves them, since a purchase may succeed. An empty catalogue refuses nothing, because it cannot be told apart from one still loading. Returning null from magic_payments' store rail for a blank key was rejected: its README documents a non-null rail at a blank key, and with no rail the plan cards would show web prices on a store build. MagicStarterProduct.storeIdIn(ManageVia) is the per-store id lookup the gate and MagicStarterPlan.storeProducts share. lib/src/http/controllers/magic_starter_billing_controller.dart, lib/src/models/magic_starter_product.dart, lib/src/models/magic_starter_plan.dart, test/http/controllers/magic_starter_billing_controller_test.dart, test/ui/views/teams/magic_starter_billing_view_test.dart, doc/basics/teams.md