Wallet connect button does not handle account changes
- Vorherrschende Sprache
- Rust
- Sterne
- 10
- Forks
- 12
- Ø Merge
- 1 T. 15 Std.
- Gemergte PRs (30 T.)
- 9
Beschreibung
### Packages versions
miden-wallet: 1.1.1
### Bug description
I previously connected a miden-wallet account using the new wallet connect button on the testnet faucet page. Now that I have reinstalled the wallet and created a new account, I am having issues using the wallet connect button.
Using the wallet connect button to populate the recipient address:
- public notes do not arrive in my wallet
- private notes fail verification
If I copy my address from the wallet and paste into the recipient address field:
- public notes arrive in the wallet and are consumed
- private notes pass verification and are consumed
The wallet connect button appears to still be connecting to my old account, rather than the current account loaded in miden-wallet. I confirmed that the address populated in the recipient address field does not match the address from any accounts currently loaded in my wallet.
From a cursory investigation, it seems that the faucet page doesn't handle the change in the adapter, similar to how the built-in [WalletProvider react component](https://github.com/demox-labs/miden-wallet-adapter/blob/main/packages/core/react/WalletProvider.tsx#L197) handles the change
### How can this be reproduced?
1. Have miden wallet installed with an account created or imported
2. On https://faucet.testnet.miden.io/, connect the account using the wallet connection button
3. Remove miden wallet extension and reinstall
4. Create a new account
5. On https://faucet.testnet.miden.io/, click the wallet connection button again
6. Observe the address does not match that of the newly created account
7. Observe that public and private notes cannot be consumed on the new account
### Relevant log output
```shell
```
Beitragsleitfaden
Rechercherichtung
Look at the wallet connect button implementation on the faucet page, likely in a React component. Compare with the WalletProvider component from the miden-wallet-adapter repository to see how it handles adapter changes. The fix involves updating the connection logic to listen for account changes and refresh the connected address. Test by reproducing the steps: reinstalling the wallet and checking the populated address matches the new account.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, react, rust
- Bereich
- frontend, web-dev
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 55/100