Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site becomes not monetized on clicking 1password notification #819

Open
sidvishnoi opened this issue Jan 10, 2025 · 1 comment · May be fixed by #831
Open

Site becomes not monetized on clicking 1password notification #819

sidvishnoi opened this issue Jan 10, 2025 · 1 comment · May be fixed by #831
Labels
bug Something isn't working
Milestone

Comments

@sidvishnoi
Copy link
Member

  1. Visit https://webmonetization.org/play/.
  2. Add a wallet address.
    • Site becomes monetized.
  3. 1password shows notification iframe to (incorrectly) ask to save wallet address in vault. Click "close".
  4. Site becomes non-monetized.

Trace:

monetization [PAYMENT SESSION] requestId=20b4547b-fcc2-4b02-9d0e-d5ac3a92b0dd; receiver=https://ilp-sandbox.chimoney.com/37294745

    Clearing timeout=11
debug @ paymentSession.ts:229
clearTimers @ paymentSession.ts:222
stop @ paymentSession.ts:208
clearSessionsByTabId @ tabState.ts:190
(anonymous) @ tabEvents.ts:94

tab-state Cleared 1 sessions for tab 2002829598.

Diagnosed to this part of code:

// tabEvents.ts 
  onUpdatedTab: CallbackTab<'onUpdated'> = (tabId, changeInfo, tab) => {
    /**
     * if loading and no url -> clear all sessions but not the overpaying state
     * if loading and url -> we need to check if state keys include this url.
     */
    if (changeInfo.status === 'loading') {
      const url = tab.url ? removeQueryParams(tab.url) : '';
      const clearOverpaying = this.tabState.shouldClearOverpaying(tabId, url);

      this.tabState.clearSessionsByTabId(tabId);
@sidvishnoi sidvishnoi added the bug Something isn't working label Jan 10, 2025
@sidvishnoi sidvishnoi added this to the v0.5 milestone Jan 10, 2025
@sidvishnoi sidvishnoi moved this from Backlog to Todo in Web Monetization Extension Jan 10, 2025
@sidvishnoi sidvishnoi moved this from Todo to In Progress in Web Monetization Extension Jan 10, 2025
@sidvishnoi
Copy link
Member Author

Happens when iframe is navigated. onUpdatedTab gets triggered with changeInfo.status === 'loading' 😬

@sidvishnoi sidvishnoi moved this from In Progress to In Review in Web Monetization Extension Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Review
Development

Successfully merging a pull request may close this issue.

1 participant