I’m trying to allow a user to place a bid on an NFT on OpenSea. My code is below.
const bid = await Moralis.Plugins.opensea.createBuyOrder({
tokenId: i,
tokenAddress: contractAddress,
network: 'mainnet',
amount: userMaxBid,
userAddress: user.attributes.ethAddress,
});
It’s successfully initiating MetaMask to sign the transaction, and when it is signed a TypeError is thrown.
TypeError: Cannot read properties of undefined (reading 'triggers')
at MoralisWeb3.js:957
at tryCatch (runtime.js:63)
at Generator.invoke [as _invoke] (runtime.js:293)
at Generator.next (runtime.js:118)
at tryCatch (runtime.js:63)
at maybeInvokeDelegate (runtime.js:356)
at Generator.invoke [as _invoke] (runtime.js:267)
at Generator.next (runtime.js:118)
at asyncGeneratorStep (asyncToGenerator.js:5)
at _next (asyncToGenerator.js:27)
I have tried entering all inputs as numbers, strings etc and nothing seems to work. I’ve also tried entering the amount in eth, gwei and wei in strng and bigint formats.The fulfillOrder function is working perfectly for me however.
Anyone else got this issue and know how to resolve?