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 getting currently connected dapp info #3671

Merged
merged 2 commits into from
Nov 15, 2023
Merged

Conversation

jagodarybacka
Copy link
Contributor

@jagodarybacka jagodarybacka commented Nov 14, 2023

Resolves #3661

What

  • Add a reusable hook that will handle finding a browser tab currently connected to the wallet to make it easier to display info about connected dapp.
  • Don't use lastFocusedWindow argument so window popup (token spend approval) can use the same hook for finding connected dapp.

image

Testing steps

  • make sure wallet displays info about connected dapp in the top header when your active tab is the dapp's tab
    image

  • make sure you can see the dapp avatar on the token approval screen

Latest build: extension-builds-3671 (as of Wed, 15 Nov 2023 12:52:07 GMT).

Add a reusable hook that will handle finding
a browser tab currently connected to the wallet
to make it easier to display info about connected dapp.
Don't use  `lastFocusedWindow` argument so window
popup can use the same hook for finding connected dapp.
import { useBackgroundSelector } from "./redux-hooks"

// eslint-disable-next-line import/prefer-default-export
export function useDappPermision(): {
Copy link
Contributor

Choose a reason for hiding this comment

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

Little type-o

Suggested change
export function useDappPermision(): {
export function useDappPermission(): {

Copy link
Contributor

@xpaczka xpaczka left a comment

Choose a reason for hiding this comment

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

🚀 Looks good, works great. Small type-o and we are good to go

Copy link
Contributor

@xpaczka xpaczka left a comment

Choose a reason for hiding this comment

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

:shipit:

@xpaczka xpaczka merged commit 03bc18d into main Nov 15, 2023
5 of 6 checks passed
@xpaczka xpaczka deleted the connected-dapp-favicon branch November 15, 2023 12:38
@jagodarybacka jagodarybacka mentioned this pull request Nov 22, 2023
Shadowfiend added a commit that referenced this pull request Nov 23, 2023
## What's Changed
* Check connecting to dapp on different network after disconnecting by
@michalinacienciala in #3654
* v0.51.0 by @Shadowfiend in
#3652
* Fix typos by @xiaolou86 in
#3668
* Alchemic Logs: Small improvements for eth_getLogs by @Shadowfiend in
#3664
* Fix getting currently connected dapp info by @jagodarybacka in
#3671
* Add static subcape link to the wallet by @jagodarybacka in
#3670
* Fix e2e tests by @michalinacienciala in
#3651
* Add Alchemy endpoint for Arbitrum Sepolia by @jagodarybacka in
#3665
* Do notify: Set up base NotificationService by @Shadowfiend in
#3666

## New Contributors
* @xiaolou86 made their first contribution in
#3668

**Full Changelog**:
v0.51.0...v0.52.0

Latest build:
[extension-builds-3678](https://github.com/tahowallet/extension/suites/18415208655/artifacts/1067210815)
(as of Wed, 22 Nov 2023 14:53:11 GMT).
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.

Fix missing dapp icon on token approval page
2 participants