You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If user has image data in domain custom data, check if imgChainId is present.
If it's not present, check the chain where domain is running on for NFT data.
If chainID is present, check that chain.
In any case also check if user really owns this NFT. If user owns it, we can add a verified checkmark somewhere (or vice-versa, if they don't own it, add a non-verified checkmark). The alternative is to use hexagon image placeholder (just like Twitter does).
The text was updated successfully, but these errors were encountered:
function editData(stringcalldata_domainName, stringcalldata_data) external {
require(domains[_domainName].holder ==msg.sender, "Only domain holder can edit their data");
// TODO: check if imgAddress is a contract address and do:// require(IERC721(address).ownerOf(imgTokenId) == msg.sender)
domains[_domainName].data = _data;
emitDataChanged(msg.sender);
}
But as far as I know, this would require that imgChainId is the same chain as the contract
But if the check is only implemented in the front-end, this should be both when trying to set the image (to protect users from committing a useless transaction) and when actually showing the image (to prevent people from committing the update on the contract directly and showing an NFT they don't own).
If user has image data in domain custom data, check if imgChainId is present.
If it's not present, check the chain where domain is running on for NFT data.
If chainID is present, check that chain.
In any case also check if user really owns this NFT. If user owns it, we can add a verified checkmark somewhere (or vice-versa, if they don't own it, add a non-verified checkmark). The alternative is to use hexagon image placeholder (just like Twitter does).
The text was updated successfully, but these errors were encountered: