How will ERC721 tokenUri update on Opensea?

Viewed 567

I have deployed a smart contract on Rinkeby network. I am trying to return the tokenUri based on a boolean as below:

function tokenURI(uint256 tokenId)
    public
    view
    override
    returns (string memory)
{
    require(_exists(tokenId), "Token URI query for nonexistent token!");
    if(revealed == true) {
        return string(abi.encodePacked(BASE_URI, "/", Strings.toString(tokenId), ".json"));
    } else {
        return string(abi.encodePacked(BASE_URI, DEFAULT_METADATA));
    }
}

The above code works fine. I can query the token URI on etherscan and see desired output. However the same is not reflecting on Opensea. Opensea is showing the old image always. I have a function using which I can set revealed bool value.

I have waited for 24 hrs to see if Opensea updates but it does not. What can be the issue?

0 Answers
Related