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

Handle Watchlist Deeplinks #2179

Merged
merged 3 commits into from
Jan 8, 2025
Merged

Handle Watchlist Deeplinks #2179

merged 3 commits into from
Jan 8, 2025

Conversation

atn4z7
Copy link
Collaborator

@atn4z7 atn4z7 commented Jan 8, 2025

Description

we can now handle these links:

  • core://watchlist/avalanche-2: will direct to AVAX watchlist token screen (avalanche-2 is a coingecko id)
  • core://watchlist: will direct to watchlist tab
  • any https link: will open with the in-app browser

Screenshots/Videos

core://watchlist/avalanche-2

open.avax.mp4

core://watchlist/somethingnotvalid

this also applies to any tokens that our backend doesn't index/cache

token.not.found.mp4

https link

open.https.link.mp4

Testing

In DeeplinkContext.tsx file, you can manually call this to test this new behavior

useEffect(() => {
    setPendingDeepLink({
      url: 'core://watchlist/avalanche-2',
      origin: DeepLinkOrigin.ORIGIN_NOTIFICATION
    })
  }, [])

Checklist

Please check all that apply (if applicable)

  • I have performed a self-review of my code
  • I have verified the code works
  • I have added/updated necessary unit tests
  • I have updated the documentation

export enum NewsEvents {
PRODUCT_ANNOUNCEMENTS = 'PRODUCT_ANNOUNCEMENTS',
OFFERS_AND_PROMOTIONS = 'OFFERS_AND_PROMOTIONS',
MARKET_NEWS = 'MARKET_NEWS'
Copy link
Contributor

Choose a reason for hiding this comment

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

should we include price_alerts here too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes this is just an example. there is a todo to add the correct ones when integrating with backend

Copy link
Contributor

@ruijialin-avalabs ruijialin-avalabs left a comment

Choose a reason for hiding this comment

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

nice!

@atn4z7 atn4z7 merged commit 8c682d7 into main Jan 8, 2025
4 checks passed
@atn4z7 atn4z7 deleted the notif_deeplink branch January 8, 2025 15:12
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.

2 participants