Guys, thx for the awesome tutorial, I have followed it but have encountered a problem. When I click the âokâ button, metamask window doesnât pop-up to complete the transferâŚdid it exactly the way shown in the tutorial, the only difference is that am using Polygon mainnet instead o Mumbai testnet. Here is the code from purchase.js file.
type or const handleOk = async () => {
// Get The Price of MATIC
const options = {
address: '0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0',
chain: 'eth',
}
const price = await Moralis.Web3API.token.getTokenPrice(options)
const priceMatic = book.price / price.usdPrice
// Send Matic to book store owner address
const options1 = {
type: 'native',
amount: Moralis.Units.ETH(priceMatic),
receiver: '0xf6aE1d525c27Dd2fd4Fc71ce56a7e10Eb71d2***',
}
let result = await Moralis.transfer(options1)paste code here
in the VS code, âlet resultâ part is underlined, saying the variable is defined but never usedâŚmaybe it is related to the problem am having? Any ideas what might be wrong?
Thanks in advance