Skip to content

Commit

Permalink
Merge branch 'main' into remove-price-limit
Browse files Browse the repository at this point in the history
  • Loading branch information
snreynolds authored Oct 17, 2024
2 parents 68ddc9c + 40c9260 commit a4cd944
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .forge-snapshots/positionDescriptor bytecode size.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
31065
31074
2 changes: 1 addition & 1 deletion src/libraries/SVG.sol
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ library SVG {
string memory tickLowerStr = tickToString(tickLower);
string memory tickUpperStr = tickToString(tickUpper);
uint256 str1length = bytes(tokenId).length + 4;
string memory hookSlice = string(abi.encodePacked(substring(hookStr, 0, 5), "...", substring(hookStr, 37, 40)));
string memory hookSlice = string(abi.encodePacked(substring(hookStr, 0, 5), "...", substring(hookStr, 39, 42)));
uint256 str2length = bytes(hookSlice).length + 5;
uint256 str3length = bytes(tickLowerStr).length + 10;
uint256 str4length = bytes(tickUpperStr).length + 10;
Expand Down
5 changes: 4 additions & 1 deletion src/libraries/SafeCurrencyMetadata.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ library SafeCurrencyMetadata {
return 0;
}
if (data.length == 32) {
return abi.decode(data, (uint8));
uint256 decimals = abi.decode(data, (uint256));
if (decimals <= type(uint8).max) {
return uint8(decimals);
}
}
return 0;
}
Expand Down

0 comments on commit a4cd944

Please sign in to comment.