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

[BUG] Taquito Wallet Setup Code leads to Beacon "Awaiting confirmation" popup not closing after successfull confirmation #165

Closed
mschmidm opened this issue Nov 15, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@mschmidm
Copy link

Describe the bug

The code sample provided at the Taquito Wallet Setup is not working as intended. I tried it on NextJs and VueJs and got the same bug: the popup Beacon "Awaiting confirmation" does not close after the user successfully connects his wallet.

To Reproduce
Steps to reproduce the behavior:

  1. Complete the first steps of the docs (General setup, Wallet setup)
  2. Connect the wallet
  3. The console logs a successfully connection (which is correct) but the Beacon popup does not close and waits for confirmation forever.

Expected behavior
The docs should have a working example.

Potential bug cause
I noticed that removing the EventHandler resolves the bug.

import { TezosToolkit } from '@taquito/taquito'
import { BeaconWallet } from '@taquito/beacon-wallet'
import { NetworkType } from '@airgap/beacon-types';

const Tezos = new TezosToolkit('https://ghostnet.ecadinfra.com')
const options = {
  name: 'MyAwesomeDapp',
  iconUrl: 'https://tezostaquito.io/img/favicon.svg',
  preferredNetwork: NetworkType.GHOSTNET,
//  eventHandlers: {
//    PERMISSION_REQUEST_SUCCESS: {
//      handler: async (data) => {
//        console.log('permission data:', data)
//      },
//    },
//  },
}
const wallet = new BeaconWallet(options)
await wallet.requestPermissions({
  network: { type: NetworkType.GHOSTNET },
})
Tezos.setWalletProvider(wallet)

Thank you for working on the Docs! :)

@mschmidm mschmidm added the bug Something isn't working label Nov 15, 2023
@timothymcmackin timothymcmackin self-assigned this Nov 15, 2023
@timothymcmackin
Copy link
Collaborator

Thanks for the correction. I have reproduced the problem and added the fix to #167.

@timothymcmackin
Copy link
Collaborator

Fixed by #167.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants