Skip to content

Commit

Permalink
feat: add user param to plasa view
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoAcosta committed Nov 6, 2024
1 parent deff09a commit e86bb07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/plasa/Plasa.sol
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ contract Plasa is Ownable, IPlasa {
}

/// @inheritdoc IPlasaView
function getPlasaView() external view returns (PlasaView memory) {
function getPlasaView(address user) external view returns (PlasaView memory) {
return
PlasaView({
data: PlasaData({ contractAddress: address(this), namesContract: address(names) }),
user: PlasaUser({ isRegistered: isRegistered(msg.sender), username: getUsername(msg.sender) })
user: PlasaUser({ isRegistered: isRegistered(user), username: getUsername(user) })
});
}
}
3 changes: 2 additions & 1 deletion src/plasa/interfaces/IPlasaView.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ interface IPlasaView {
}

/// @notice Retrieves the Plasa view data.
/// @param user The address of the user whose Plasa view data is to be retrieved.
/// @return PlasaView The Plasa view data.
function getPlasaView() external view returns (PlasaView memory);
function getPlasaView(address user) external view returns (PlasaView memory);
}

0 comments on commit e86bb07

Please sign in to comment.