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

Acc change in Bearby not reflected in Connect wallet pop up #620

Open
loonggamma opened this issue Mar 25, 2024 · 9 comments
Open

Acc change in Bearby not reflected in Connect wallet pop up #620

loonggamma opened this issue Mar 25, 2024 · 9 comments
Labels
Frontend P2 Mid level priority
Milestone

Comments

@loonggamma
Copy link

Context
@peterjah you asked to test switching accounts on Bearby. Tested on the integration branch.

Flow from Connect wallet:

  • When on the Connect wallet pop up
  • Open Bearby and switch accounts in the extension.
  • In the pop up, the address hash doesn't change. It keeps displaying the first connected wallet.
    It is not updated in the main Bridge window as well, after I close the pop up before reloading the page.
  • Address hash is updated when the page is reloaded.

Flow from the main Bridge window:

  • Connect account 1
  • Close pop up, From the main Bridge screen, open Bearby and switch to account 2.
  • Shown as connected is changed.
    This behavior should be everywhere. User shouldn't have to reload the page to see the correct account displayed.

How to

  1. update account info without user having to reload the page (without user action).
  2. The most minimal alternative would be to tell the user to reload the page or add a refresh icon, if 1. can't be done.

Technical details
Give the technical insights so anyone in the team can tackle the tasks - Dev

QA testing
Does this task require some QA tests ?
If yes, explain how to validate it

@loonggamma loonggamma added this to the Front for Mainnet milestone Mar 25, 2024
@loonggamma loonggamma added P2 Mid level priority Frontend labels Mar 25, 2024
@pivilartisant
Copy link
Contributor

pivilartisant commented Mar 25, 2024

SO after investigation, this seems to be coming from bearby or wallet provider or our implementation of the listenAccountChanges() fn (pretty sure it's not the case because we haven't changed anything here since implementation)

Bearby merged a pr last week that had to do with accounts: bearby-wallet/bearby-extension@986bf7c but not sure it's linked

And then there is a function: https://github.com/massalabs/wallet-provider/blob/main/src/bearbyWallet/BearbyProvider.ts listenAccountChanges() that is linked to the bug:

Why ? the problem seems to be on main and on integration => the function provided by provider listenAccountChanges() only is triggered once after an account change (to test: open bridge, connect bearby, change address once, see address change on bridge ui, change address again see no change).... rest of the time there seems to be a bug where it doesn't trigger when user changes account. Note: if the user clicks on same account, that the fn is fired...

In terms of bridge FE code: our account address are dynamic and updates upon change. So a temporary solution would be to ask user to reload, but that would not fix the bug as previously explained.

Waiting for more info...

@Ben-Rey @longgamma-massa

@loonggamma
Copy link
Author

cc @peterjah @pivilartisant let me know if you need any info from me, or if I need to communicate something to Rinat from Bearby. I didn't understand where is the bug coming from.

@pivilartisant
Copy link
Contributor

cc @peterjah @pivilartisant let me know if you need any info from me, or if I need to communicate something to Rinat from Bearby. I didn't understand where is the bug coming from.

I synced with @Ben-Rey and we're testing to see if it's a bug on provider or bearby

@pivilartisant
Copy link
Contributor

pivilartisant commented Mar 26, 2024

cc @peterjah @pivilartisant let me know if you need any info from me, or if I need to communicate something to Rinat from Bearby. I didn't understand where is the bug coming from.

I synced with @Ben-Rey and we're testing to see if it's a bug on provider or bearby

its seems to be coming from bearby... should I create an issue or directly contact rinat on bearby discord ?

@Ben-Rey
Copy link
Contributor

Ben-Rey commented Mar 27, 2024

cc @peterjah @pivilartisant let me know if you need any info from me, or if I need to communicate something to Rinat from Bearby. I didn't understand where is the bug coming from.

I synced with @Ben-Rey and we're testing to see if it's a bug on provider or bearby

its seems to be coming from bearby... should I create an issue or directly contact rinat on bearby discord ?

Best way to reach him is to make an issue and send the link on bearby telegram.

@pivilartisant
Copy link
Contributor

cc @peterjah @pivilartisant let me know if you need any info from me, or if I need to communicate something to Rinat from Bearby. I didn't understand where is the bug coming from.

I synced with @Ben-Rey and we're testing to see if it's a bug on provider or bearby

its seems to be coming from bearby... should I create an issue or directly contact rinat on bearby discord ?

Best way to reach him is to make an issue and send the link on bearby telegram.

bearby-wallet/bearby-web3#15

@pivilartisant
Copy link
Contributor

Hiracu is taking care of it, we are waiting for new bearby release.

@Thykof
Copy link
Contributor

Thykof commented Apr 8, 2024

it still doesn't work for me.

@loonggamma
Copy link
Author

loonggamma commented Apr 9, 2024

I believe the best is to go to Rinat directly in this issue @Thykof bearby-wallet/bearby-web3#15

@loonggamma loonggamma modified the milestones: Front for Mainnet, Post V1 Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend P2 Mid level priority
Projects
None yet
Development

No branches or pull requests

4 participants