metaplex-foundation / js

A JavaScript SDK for interacting with Metaplex's programs
356 stars 182 forks source link

[Help Wanted]: auctionHouse - Listing assets #486

Open Harish88s opened 1 year ago

Harish88s commented 1 year ago

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 () at eval (_async_to_generator.mjs?b1b8:21:1) at mint (index.js?bee7:107:11) at HTMLUnknownElement.callCallback (react-dom.development.js?ac89:4164:1) at Object.invokeGuardedCallbackDev (react-dom.development.js?ac89:4213:1) at invokeGuardedCallback (react-dom.development.js?ac89:4277:1) at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js?ac89:4291:1) at executeDispatch (react-dom.development.js?ac89:9041:1) at processDispatchQueueItemsInOrder (react-dom.development.js?ac89:9073:1) at processDispatchQueue (react-dom.development.js?ac89:9086:1) at dispatchEventsForPlugins (react-dom.development.js?ac89:9097:1) at eval (react-dom.development.js?ac89:9288:1) at batchedUpdates$1 (react-dom.development.js?ac89:26140:1) at batchedUpdates (react-dom.development.js?ac89:3991:1) at dispatchEventForPluginEventSystem (react-dom.development.js?ac89:9287:1) at dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay (react-dom.development.js?ac89:6465:1) at dispatchEvent (react-dom.development.js?ac89:6457:1) at dispatchDiscreteEvent (react-dom.development.js?ac89:6430:1)

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

yuanshanhshan commented 1 year ago

toBuffer is function not param , so change toBuffer to toBuffer( )??

mikekitckchan commented 1 year ago

I am facing exactly the same issue. Anyone knows solution of this? Thanks!