Skip to content

Commit

Permalink
fix: zero address issue
Browse files Browse the repository at this point in the history
Signed-off-by: tipusinghaw <[email protected]>
  • Loading branch information
tipusinghaw committed May 6, 2024
1 parent 856ff9f commit 0aa5903
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contracts/PolygonDidRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ contract PolygonDidRegistry {
string memory didDoc
)
{
require(_id != address(0), 'Invalid address provided');
polyDIDs[_id].controller = msg.sender;
polyDIDs[_id].created = block.timestamp;
polyDIDs[_id].updated = block.timestamp;
Expand Down Expand Up @@ -204,6 +205,7 @@ contract PolygonDidRegistry {
onlyController(_id)
returns (address, string memory, string memory)
{
require(_id != address(0), 'Invalid address provided');
resourceData[_id][_resourceId] = _resourcePayload;
keysById[_id].push(_resourceId);
emit ResourceAdded(_id, _resourceId, _resourcePayload);
Expand Down

0 comments on commit 0aa5903

Please sign in to comment.