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

Uncaught (in promise) Error: Cannot GET address/<wallet address> #94

Closed
tannerhallman opened this issue Dec 10, 2021 · 1 comment
Closed

Comments

@tannerhallman
Copy link

I am running into an error trying to create a tx on the dev-net. This error message isn't helping me.

Uncaught (in promise) Error: Cannot GET address/<--my wallet address revoked-->: [[object Object]]
at ProxyProvider.handleApiError (proxyProvider.js?2fbe:205)
at ProxyProvider.eval (proxyProvider.js?2fbe:174)
at Generator.throw ()
at rejected (proxyProvider.js?2fbe:25)

Here's my code:

  async function mint() {
   const transaction = await newTransaction(
     address,
     quantity * config.nftPriceInEgld
   );

   let provider = ExtensionProvider.getInstance();
   await provider.init();

   let hash = await provider.sendTransaction(transaction);
   console.log(hash);
 }
  async function newTransaction(senderAddress, egldAmount = 1) {
    const gasLimit = 500000;
    const chainId = 'D';

    let proxy = new ProxyProvider(config.network);
    let account = new Account(new Address(address));
    await account.sync(proxy);
    console.log(account);

    return new Transaction({
      sender: new Address(senderAddress),
      receiver: new Address(config.internalWalletAddress),
      value: Balance.egld(egldAmount),
      gasLimit: new GasLimit(gasLimit),
      chainID: new ChainID(chainId),
      nonce: account.nonce
    });
  }

@tannerhallman
Copy link
Author

Fixed this by using a different provider that was initalized during wallet connect

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

1 participant