Insufficient fund for error PLZ HELP URGENT FORTUNE 50 COMPANY

 async function authenticateWallet(type: number){
        try {
            if (type == 1){
                // Wallet Connect
                await  authenticate({provider: 'walletconnect'})
            } else if (type == 2){
                // MetaMask
                await authenticate()
    
            }
        } catch (error) {
            console.log(error)
        }
       
        props.toggleActive(false)

    }

stuck on await and never hit catch either. i can exit out and try to run a function but get this error

Error: insufficient funds for intrinsic transaction cost (error={“message”:“err: insufficient funds for gas * price + value: address 0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx have 0 want 100000000000000000 (supplied gas 14995852)”,“code”:-32000}, method=“estimateGas”, transaction={“from”:“0xxxxxxxxxxxxxxxxxC”,“to”:“xxxxxxxxxxxxxxxxxxxxx”,“value”:{“type”:“BigNumber”,“hex”:“0x016345785d8a0000”},“data”:“0xa0xxx000000000000000000000000000000000000000000000000000000000000001”,“accessList”:null}, code=INSUFFICIENT_FUNDS, version=providers/5.5.2)

The nft contract requires .1 bnb to mint.

    const mintOptions = {
      contractAddress: "0xxxxxxxxxxxxxx",
      functionName: "mint",
      abi: options.abi,
      params: {_mintAmount: 1},
      msgValue: Moralis.Units.ETH('0.1')
    };
const transaction = await Moralis.executeFunction(mintOptions);
    

the account has .11 bnb

moralis 1.3.2
react-moralis 1.3.1
wallet-connect 1.7.0

theory:
is it because the “wallet connect” haven’t resolved? but it was able to read the sender address but the user.getusername is not showing anything

Hi @darren120
A quick solution could be to increase the gas price in walletconnect and try doing tranx.

Meanwhile i will try to re-create the error.

Let me know if it helps

hi, can u show code example? the moralis docs is not very typed. idk what the options param allows at all

what if you try to increase the fund in your wallet as well? 0.01 margin seems a bit to tight to pay the gas fee as well, coz beside the 0.1BNB you need for the minting, you need to pay the gas fees too

if you wanna tr to increase the gas fee, currently the only way is to use the etherjs/web3js directly as those input are not supported by Moralis.executeFunction

What version of Moralis sdk are you using?

moralis 1.3.2
react-moralis 1.3.1
wallet-connect 1.7.0

Are you sure you make the transaction in the network where you have the funds?

I tried connecting via bsc and eth, both show the same address so I doubt it’s that issue. The fact that wallet connect just hangs without resolving the promise maybe the issue. Can u plz test in an environment ? I am using ngrok in development to enable SSL for wallet connect since it is required for wallet connect

The address will be the same in any network, but the tokens balance will be different from network to network

You can specify the chain id when you try to connect to wallet connect

wallet connect just hangs…

try to connect, then disconnect. after that all subsquent connection just hangs

sir, can u tell ur team wallet connect just hangs and never resolves!!!

hello, plz check ur internals why wallet connect is hanging and promise is never resolving.

I have concluded is morlis’s side that is causing the issue.

Reproduce: Trust wallet on mobile to connect using wallet connect QR code. if connection successful, try logging out and connecting again. the issue will start occuring ALOT

I am able to execute functions but moralis user info doesn’t show up. thus i concluded that the problem is with moralis side promise is not being fufilled even tho socket is successfully established with wallet connect itself. I can see the address of the wallet but not the user object provided by moralis since it is NULL. Moralis promise is hanging because i think it is trying to set the user. help man

plz fix.

hello, plz check ur internals why wallet connect is hanging and promise is never resolving.

I have concluded is morlis’s side that is causing the issue.

Reproduce: Trust wallet on mobile to connect using wallet connect QR code

I am able to execute functions but moralis user info doesn’t show up. thus i concluded that the problem is with moralis side promise is not being fufilled even tho socket is successfully established with wallet connect itself.

plz fix. .

hi, can u plz fast track this i am about to be put on PIP

hi, can u plz fast track this i am about to be put on PIP

im going to use infura plz respond or acknowledge ty.

Hi @darren120
I am looking into it, can you elaborate your issue with some code too

i am trying to connect with walletconnect meanwhile

Just now connected to trust wallet using walletconnect with no issues

@darren120

async function walletcheck(){  
    let user = Moralis.User.current();
    const connection = await Moralis.authenticate({ 
        provider: "walletconnect", 
        chainId: 56,
        mobileLinks: [
        "rainbow",
        "metamask",
        "argent",
        "trust",
        "imtoken",
        "pillar",
        ], 
        signingMessage: user  
    })
    console.log(connection);
}

Check this code snippet