Skip to content

Wallet connect button does not handle account changes #171

Description

@krwang

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 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions