File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import {ErrorsLib} from "./ErrorsLib.sol";
5
5
import {AggregatorV3Interface} from "../interfaces/AggregatorV3Interface.sol " ;
6
6
7
7
library DataFeedLib {
8
- /// @dev Performing some security checks and returns the latest price of a feed.
8
+ /// @dev Performs some safety checks and returns the latest price of a feed.
9
9
/// @dev When `feed` is the address zero, returns 1.
10
10
function getPrice (AggregatorV3Interface feed ) internal view returns (uint256 ) {
11
11
if (address (feed) == address (0 )) return 1 ;
@@ -14,7 +14,8 @@ library DataFeedLib {
14
14
return uint256 (answer);
15
15
}
16
16
17
- /// @dev Returns `feed.decimals()` when `feed` is not the address zero, else returns 0.
17
+ /// @dev Returns the number of decimals of a feed.
18
+ /// @dev When `feed` is the address zero, returns 0.
18
19
function getDecimals (AggregatorV3Interface feed ) internal view returns (uint256 ) {
19
20
if (address (feed) == address (0 )) return 0 ;
20
21
return feed.decimals ();
You can’t perform that action at this time.
0 commit comments