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 () => {
try {
const info = await Purchases.restoreTransactions();
this.handleInfo(info);
} catch (e) {
// eslint-disable-next-line no-console
console.log(JSON.stringify(e));
}
}}
>
export const restoreSubscription = async (): Promise => {
userRestoredPurchase();
try {
await Purchases.restoreTransactions();
} catch (err) {
log("Error", err);
Sentry.captureException(err);
}
};