Moralis.Web3API.account.getNFTs returns wrong owner?

Something seems odd when I am making a call with different wallet address to the getNFTs function. As you can see the screen below, Iā€™m passing in the user address to the rinkeby blockchain.

The resulting data shows the owner_of wallet address is from a previous owner which no longer owns this.

This is what is show in the moralis database as the owner of this NFT:

Having said that, they do have different block numbers. Does this API return NFT from a historical data standpoint? Even though it no longer owns that NFT and sold it to the wallet address above?

can you paste the addresses so that I can test?

@cryptokid
This first address is where the original NFT was minted (total 2 nft minted) 0x05a2787e22cB92176B6eB9B0301Aa69B09e2E0Ab

The second address purchased the one of the NFT from the first address (No NFT owned currently):
0xC84046CFD73D619891dd41726De876eD05D7c1ED

The third address here purchased the NFT from the second address: (The current owner of the NFT)
0x8336c6B44eCb059f270386705AAf4aa90b936D95

the problem seems to be that nfts with amount 0 are returned.

x = await Moralis.Web3API.account.getNFTs({address: '0x8336c6B44eCb059f270386705AAf4aa90b936D95', chain: 'rinkeby'})

=>

{
    "total": 1,
    "page": 0,
    "page_size": 500,
    "result": [
        {
            "token_address": "0x88b48f654c30e99bc2e4a1559b4dcf1ad93fa656",
            "token_id": "2548625077589687164871256322683439792282111753964434957136564654939553398785",
            "block_number_minted": "9776580",
            "owner_of": "0x8336c6b44ecb059f270386705aaf4aa90b936d95",
            "block_number": "9776827",
            "amount": "1",
            "contract_type": "ERC1155",
            "name": "OpenSea Collections",
            "symbol": "OPENSTORE",
            "token_uri": "https://testnets-api.opensea.io/api/v1/metadata/0x88B48F654c30e99bc2e4A1559b4Dcf1aD93FA656/0x05a2787e22cb92176b6eb9b0301aa69b09e2e0ab000000000000020000000001",
            "metadata": "{\"name\":\"Kobe Collectors 1\",\"description\":null,\"external_link\":null,\"image\":\"https://lh3.googleusercontent.com/zQV_ZQSpYYf_o_XkaLGWO_sD1QXMerdyGHIDps9a1nfQOwZX8UxX3i9Uui1S9qOT6K-Fcy3RSjal3hmt04AyAYXw0qCftIZ7N8fHZq0\",\"animation_url\":null}",
            "synced_at": "2021-12-08T03:12:12.827Z",
            "is_valid": 1,
            "syncing": 2,
            "frozen": 0
        }
    ],
    "status": "SYNCED"
}
x = await Moralis.Web3API.account.getNFTs({address: '0xC84046CFD73D619891dd41726De876eD05D7c1ED', chain: 'rinkeby'})

=>

{
    "total": 1,
    "page": 0,
    "page_size": 500,
    "result": [
        {
            "token_address": "0x88b48f654c30e99bc2e4a1559b4dcf1ad93fa656",
            "token_id": "2548625077589687164871256322683439792282111753964434957136564654939553398785",
            "block_number_minted": "9776580",
            "owner_of": "0xc84046cfd73d619891dd41726de876ed05d7c1ed",
            "block_number": "9776580",
            "amount": "0",
            "contract_type": "ERC1155",
            "name": "OpenSea Collections",
            "symbol": "OPENSTORE",
            "token_uri": "https://testnets-api.opensea.io/api/v1/metadata/0x88B48F654c30e99bc2e4A1559b4Dcf1aD93FA656/0x05a2787e22cb92176b6eb9b0301aa69b09e2e0ab000000000000020000000001",
            "metadata": "{\"name\":\"Kobe Collectors 1\",\"description\":null,\"external_link\":null,\"image\":\"https://lh3.googleusercontent.com/zQV_ZQSpYYf_o_XkaLGWO_sD1QXMerdyGHIDps9a1nfQOwZX8UxX3i9Uui1S9qOT6K-Fcy3RSjal3hmt04AyAYXw0qCftIZ7N8fHZq0\",\"animation_url\":null}",
            "synced_at": "2021-12-08T03:12:12.827Z",
            "is_valid": 1,
            "syncing": 2,
            "frozen": 0
        }
    ],
    "status": "SYNCED"
}
x = await Moralis.Web3API.account.getNFTs({address: '0x05a2787e22cB92176B6eB9B0301Aa69B09e2E0Ab', chain: 'rinkeby'})

=>

{
    "total": 1,
    "page": 0,
    "page_size": 500,
    "result": [
        {
            "token_address": "0x88b48f654c30e99bc2e4a1559b4dcf1ad93fa656",
            "token_id": "2548625077589687164871256322683439792282111753964434957136564654939553398785",
            "block_number_minted": null,
            "owner_of": "0x05a2787e22cb92176b6eb9b0301aa69b09e2e0ab",
            "block_number": null,
            "amount": "0",
            "contract_type": "ERC1155",
            "name": "OpenSea Collections",
            "symbol": "OPENSTORE",
            "token_uri": "https://testnets-api.opensea.io/api/v1/metadata/0x88B48F654c30e99bc2e4A1559b4Dcf1aD93FA656/0x05a2787e22cb92176b6eb9b0301aa69b09e2e0ab000000000000020000000001",
            "metadata": "{\"name\":\"Kobe Collectors 1\",\"description\":null,\"external_link\":null,\"image\":\"https://lh3.googleusercontent.com/zQV_ZQSpYYf_o_XkaLGWO_sD1QXMerdyGHIDps9a1nfQOwZX8UxX3i9Uui1S9qOT6K-Fcy3RSjal3hmt04AyAYXw0qCftIZ7N8fHZq0\",\"animation_url\":null}",
            "synced_at": "2021-12-08T03:12:12.827Z",
            "is_valid": 1,
            "syncing": 2,
            "frozen": 0
        }
    ],
    "status": "SYNCED"
}

Is that a bug then? Since those other 2 address are not the owners of that NFT?

It is a bug that we are going to fix soon

1 Like

it should be fixed now

1 Like