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

Correct dApp info passed on eth_requestAccounts #3768

Merged
merged 2 commits into from
Jan 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion background/services/provider-bridge/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ export default class ProviderBridgeService extends BaseService<Events> {
// methods).
const [title, faviconUrl] = (event.request.params as unknown[]).slice(
-2,
0,
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 -2,0 and -2 alone should be synonymous. What's the difference in outcome?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought that too but -2 means start from (array length + -2). So setting the end as 0 makes it return an empty array because the ending position is before the starting position

Copy link
Contributor

Choose a reason for hiding this comment

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

Well that's embarrassing 😬

) as string[]

const existingPermission = await this.checkPermission(origin, dAppChainID)
Expand Down
Loading