-
Notifications
You must be signed in to change notification settings - Fork 18
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
chore(tangle-dapp): Add token to wallet post bridge transaction #2786
Conversation
✅ Deploy Preview for tangle-cloud ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for tangle-dapp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@devpavan04 Does this PR handle the case where the token already exists in the wallet? Will it be prompted to re-add it?
Currently, there is no direct method to check if a token is already added. The MetaMask API does not provide a function to retrieve a list of tokens added to a user's wallet. It will be prompted to re-add it, but the second modal will have a warning - already exists, be careful to add unknown tokens, etc. @monaiuu We can go with the |
We can use local storage to track if a token has been added to the MetaMask wallet. If the user successfully adds the token or receives the "Token Already Exists" error, we can record that the token is added for their currently selected account. However, this approach may require additional implementation. Alternatively, we could display the "Add to Wallet" button. If the token is already in the user's wallet, clicking the button would simply inform them that the token exists. |
Checklist:
|
Summary of changes
Proposed area of change
apps/tangle-dapp
apps/tangle-cloud
libs/tangle-shared-ui
libs/webb-ui-components
Associated issue(s)
Screen Recording
CleanShot.2025-01-31.at.07.32.51.mp4