I have seen the video https://www.youtube.com/watch?v=7TKqLJd_aYI
after I have rendered the nft in the wallet users.
I would like to call a function but the call to the function is not working and I canāt see the error, with console log I can see the click is correct
this is what my dapp
this is my code
// //for staking contract
const contractProcessor = useWeb3ExecuteFunction();
async function stake(val) {
let options = {
contractAddress: "0x21daB594d4726d1e12fAD9b5aE7EE270C07F6b75",
functionName: "stakeNft",
abi: abi,
params: {
note: "Thanks for your work",
},
msgValue: val,
};
console.log(val);
await contractProcessor.fetch({
params: options,
onSuccess: () => {
console.log("Approval Received");
},
onError: (error) => {},
});
}
in the return
{isWeb3Enabled ? (
<button
className={styles.stake_btn}
// value={nft.token_id}
onClick={() => stake(parseInt(nft.token_id))} //() => runContractFunction()
// onClick={() => runContractFunction({ params: nft.token_id })} //() =>
>
Stake# {nft.token_id}
</button>
) : null}