js
js copied to clipboard
[Help Wanted]: auctionHouse - Listing assets
When I try to “Listing assets” in auctionHouse using the below code we are getting the following error pasted the “Request” and “Response” below for your reference.
Request:
const { listing, sellerTradeState } = await metaplex
.auctionHouse()
.list({
auctionHouse,
seller: metaplex.identity(),
authority: wallet.publicKey,
auctioneerAuthority: wallet.publicKey,
tokenAccount: new PublicKey("G25A2F52Ui9tTG2yP6hGtV5FymEFpeciVH1ZgDsQEGxo"),
mintAccount: new PublicKey("5NukYgkPdoEmBxV3YgcDiDZLUoJdRjJhXkxYMqHw6B2H"),
price: 1
})
Response
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'toBuffer')
at NftPdasClient.metadata (NftPdasClient.mjs?add0:23:44)
at mintNftBuilder (mintNft.mjs?d8c8:103:1)
at Object.handle (mintNft.mjs?d8c8:42:1)
at eval (OperationClient.mjs?bc2f:33:26)
at Disposable.run (Disposable.mjs?8711:18:1)
at OperationClient.execute (OperationClient.mjs?bc2f:33:26)
at NftClient.mint (NftClient.mjs?4bfb:294:1)
at eval (index.js?bee7:110:49)
at step (tslib.es6.js?a65a:102:1)
at Object.eval [as next] (tslib.es6.js?a65a:83:46)
at asyncGeneratorStep (_async_to_generator.mjs?b1b8:3:1)
at next (async_to_generator.mjs?b1b8:25:1)
at eval (_async_to_generator.mjs?b1b8:32:1)
at new Promise (
Note: Also the code in the Auction house documentation is not working too. Pasted the URL below for your reference. https://docs.metaplex.com/programs/auction-house/trading-assets-on-auction-house#listing-assets
toBuffer is function not param , so change toBuffer to toBuffer( )??
I am facing exactly the same issue. Anyone knows solution of this? Thanks!