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

fix: getAddresses popup appearing randomly on core.app #67

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

meeh0w
Copy link
Member

@meeh0w meeh0w commented Oct 14, 2024

Fix for Expose addresses? popup showing up randomly on core.app.

It seems core.app is polling for accounts and reacting to accounts being created/renamed in the extension. If core.app is not the active tab, we show up the approval window.

@@ -3,14 +3,23 @@ import { isSyncDomain } from '@src/background/services/network/utils/getSyncDoma
import { isActiveTab } from './isActiveTab';
import { runtime } from 'webextension-polyfill';

type SkipApprovalOptions = {
allowInactiveTabs?: boolean;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with dev having to explicitly say allowInactiveTabs rather than making the tabId optional. It feels less error-prone this way.

await canSkipApproval(request.site.domain, request.site.tabId, {
domainWhitelist: EXPOSED_DOMAINS,
allowInactiveTabs: true,
})
Copy link
Contributor

@vvava vvava Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we put all of the parameters in to an object then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can simplify in a follow up PR (so I don't need to collect approvals after updating again 😄)

Copy link
Contributor

@ryanewood ryanewood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't been able to reproduce the approval address screen appearing randomly using this branch like I have on blue build. lgtm 👍

@meeh0w meeh0w merged commit c41a9ee into main Oct 15, 2024
4 of 5 checks passed
@meeh0w meeh0w deleted the fix/random-get-addresses-popup branch October 15, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants