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

ArConnect overlay stuck when user cancels wallet connect permissions request #98

Closed
l-silvestre opened this issue Apr 20, 2023 · 1 comment

Comments

@l-silvestre
Copy link

Description

When requesting that a user connects it's wallet,if the user cancels the operation in the pop-up, the arconnect overlay does not get removed.

Additional Information

Result after cancelling connection
image

Connection code:

const asyncConnectWallet = async (dispatch: Dispatch<WalletAction>) => {
  try {
    const currentPermissions = await window.arweaveWallet.getPermissions();
    if (!_.isEqual(currentPermissions, DEFAULT_PERMISSSIONS)) {
      await window.arweaveWallet.connect(DEFAULT_PERMISSSIONS);
    }
    const addr = await window.arweaveWallet.getActiveAddress();
    dispatch({ type: 'wallet_connected', address: addr });
    const winstonBalance = await arweave.wallets.getBalance(addr);
    dispatch({
      type: 'wallet_balance_updated',
      balance: parseFloat(arweave.ar.winstonToAr(winstonBalance)),
    });
  } catch (error) {
    console.log(error);
  }
};

I can catch the error but i dont know how to handle to remove the overlay.

@martonlederer
Copy link
Member

Solved in 1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants