Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onPress={async () => {
const aPackage = this.state.offerings.current.lifetime;
try {
const purchaseMade = await Purchases.purchasePackage(aPackage, {oldSKU: "old", prorationMode: Purchases.PRORATION_MODE.DEFERRED}, Purchases.PURCHASE_TYPE.SUBS);
checkIfPro(purchaseMade.purchaserInfo, this.props.navigation);
} catch (e) {
if (!e.userCancelled) {
// eslint-disable-next-line no-console
console.log(`Error handling ${JSON.stringify(e)}`);
} else {
// eslint-disable-next-line no-console
console.log(`User cancelled ${JSON.stringify(e)}`);
}
}
}}
title={this.state.proMonthlyPrice}