Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
dianakocsis committed Oct 17, 2024
2 parents 1172d56 + 40c9260 commit 004d3e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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 @@
31227
31236
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 004d3e7

Please sign in to comment.