Merge branch 'move-server-main' of https://github.com/pangeachat/client into move-server-main

pull/1476/head
Brord van Wierst 1 year ago
commit bdbcc820dc
No known key found for this signature in database
GPG Key ID: 0922A3CA225DF791

@ -49,11 +49,8 @@ class SubscriptionRepo {
final RCProductsResponseModel resp = final RCProductsResponseModel resp =
RCProductsResponseModel.fromJson(json); RCProductsResponseModel.fromJson(json);
return resp.allProducts; return resp.allProducts;
} catch (err) { } catch (err, s) {
ErrorHandler.logError( ErrorHandler.logError(e: err, s: s);
m: "Failed to fetch entitlement information for revenuecat API",
s: StackTrace.current,
);
return null; return null;
} }
} }
@ -97,7 +94,9 @@ class RCProductsResponseModel {
.map( .map(
(offering) => SubscriptionDetails( (offering) => SubscriptionDetails(
price: offering['price'], price: offering['price'],
duration: offering['duration'], duration: SubscriptionDuration.values.firstWhereOrNull(
(duration) => duration.value == offering['duration'],
),
id: offering['id'], id: offering['id'],
appId: offering['appId'], appId: offering['appId'],
), ),

Loading…
Cancel
Save