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