Skip to content

Commit

Permalink
Fixing rendering & some more optimizations for renoun.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon-Becker committed Jun 2, 2022
1 parent b6e4c1e commit 131a71d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 5 additions & 1 deletion src/contracts/BadgeRenderer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ contract BadgeRenderer {
/// @param _precision The number of decimal places to include in the string
/// @return The formatted string
function _formatInteger(uint256 _integerAsUint, uint256 _precision) internal pure returns (string memory) {


if (_integerAsUint == 0) {
return "0";
}

// calculate the length of _integerAsUint
uint256 len;
uint256 j = _integerAsUint;
Expand Down
10 changes: 3 additions & 7 deletions src/contracts/renoun.sol
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ contract Renoun is ERC721 {
string _pullRequestCreatorPictureURL;
string _pullRequestCreatorUsername;
string _commitHash;
string _repositoryOwner;
string _repositoryName;
}

mapping(uint256 => address) private _ownership;
Expand Down Expand Up @@ -150,9 +148,7 @@ contract Renoun is ERC721 {
_deletions,
_pullRequestCreatorPictureURL,
_pullRequestCreatorUsername,
_commitHash,
repositoryOwner,
repositoryName
_commitHash
);
totalSupply++;
_ownership[totalSupply] = _to;
Expand Down Expand Up @@ -280,8 +276,8 @@ contract Renoun is ERC721 {
_contribution._pullRequestCreatorPictureURL,
_contribution._pullRequestCreatorUsername,
_contribution._commitHash,
_contribution._repositoryOwner,
_contribution._repositoryName,
repositoryOwner,
repositoryName,
repositoryStars,
repositoryContributors
);
Expand Down

0 comments on commit 131a71d

Please sign in to comment.