openTrialPage creates an infinity loop and continuously opens in dev mode
Opened this issue · 1 comments
Describe the bug
A clear and concise description of what the bug is.
I've tried tried a simple instance of invoking the trail page, and it is getting called in an infinite loop: if (!window.location.href.startsWith('chrome://extensions/')){ extpay.getUser().then(user => { if (user.trialStartedAt == null){ try{ extpay.openTrialPage("7-day"); } catch(e){ console.log("error", e); } } else if(user.trialStartedAt != null && (now - user.trialStartedAt) > sevenDays && (!user.paid)) { extpay.openPaymentPage() userGood = false } }); }
To Reproduce
Steps to reproduce the behavior:
try and use openTrialPage, and you will get the popup stuck in an infinity loop of opening itself up.
Expected behavior
This should only open up once
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [iOS]
- Browser [chrome]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. macOS]
- OS:14.0 (23A344)
- Browser [chrome]
- Version [latest]
Additional context
Add any other context about the problem here.