Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

handle wallet address change gracefully do not require reload #496

Conversation

Viterbo
Copy link
Collaborator

@Viterbo Viterbo commented Nov 29, 2023

Fixes #490

Description

The PR includes three different parts:

  • removal of the legacy code (related to the login process and not part of the Antelope Wallets solution)
  • partial migration of some Antelope events (onLoggedIn and onLoggedOut)
  • refactor the previous login and logout process by subscribing to those events

With those changes, now the Antelope Wallets are the only way to log in and out, and that makes the internal subscription to the provider's accountChange event, to actually work. Because now using the Antelope library to log in to the newly detected account, will end up in a handler subscribed to the onLoggedIn event, and therefore the site will reflect the new state.

Test scenarios

See the video: Metamask-change-account--Teloscan.webm

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have cleaned up the code in the areas my change touches
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have removed any unnecessary console messages
  • I have included all english text to the translation file and/or created a new issue with the required translations for the currently supported languages
  • I have tested for mobile functionality and responsiveness
  • I have added appropriate test coverage

@Viterbo Viterbo linked an issue Nov 29, 2023 that may be closed by this pull request
Copy link

netlify bot commented Nov 29, 2023

Deploy Preview for teloscan-stage ready!

Name Link
🔨 Latest commit 821b8e0
🔍 Latest deploy log https://app.netlify.com/sites/teloscan-stage/deploys/6567a76ea6f08a0008a218aa
😎 Deploy Preview https://deploy-preview-496--teloscan-stage.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 29, 2023

Deploy Preview for dev-mainnet-teloscan ready!

Name Link
🔨 Latest commit 821b8e0
🔍 Latest deploy log https://app.netlify.com/sites/dev-mainnet-teloscan/deploys/6567a76e644ecf00083af377
😎 Deploy Preview https://deploy-preview-496--dev-mainnet-teloscan.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@donnyquixotic donnyquixotic merged commit 3c30995 into dev Nov 30, 2023
9 checks passed
@donnyquixotic donnyquixotic deleted the 490-handle-wallet-address-change-gracefully-do-not-require-reload branch November 30, 2023 17:03
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle wallet address change gracefully (do not require reload)
2 participants