Hi,
I am using moralis in a next.js environment and i have updated the moralis package to the latest version.
When i query getWalletNFTs i get the same number of results (34) wether i specify the token_addresses parameter or not. The correct answer should be 2 with token_addresses set and 34 when it is not specified.
const Address = '0x??????????????';
const chain = EvmChain.ETHEREUM;
const smartContract = '0x06012c8cf97bead5deae237070f9587f8e7a266d';
const response = await Moralis.EvmApi.nft.getWalletNFTs({
address: address,
chain: chain,
token_addresses: smartContract,
});
What am I doing wrong?
The output shows 34 objects and the first one is the voyager connected to the address, although it clearly states token_addresses and the cryptokitties contract.
ApiPaginatedResultAdapter {
data: {
total: 34,
page: 1,
page_size: 100,
cursor: null,
result: [
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object]
],
status: 'SYNCED'
},
adapter: [Function: apiToResult],
jsonAdapter: [Function: resultToJson],
params: {
address: '0xC?????????????????????????',
chain: EvmChain {
config: [Config],
_value: '0x1',
_chainlistData: [Object]
},
token_addresses: '0x06012c8cf97bead5deae237070f9587f8e7a266d'
},
nextHandler: undefined,
hasNext: [Function (anonymous)],
next: [Function (anonymous)]
}
First part of the response.data including the contract of the first object. Which is a Voyager Unknown NFT, and its definately not the cryptokitties contract address.
{
total: 34,
page: 1,
page_size: 100,
cursor: null,
result: [
{
token_address: '0xdeadab7c1324c0614e1512e3034bddd44f7fface',
token_id: '????',
Happy for any help.