Skip to content

Commit 72f3f56

Browse files
committed
resolved comments
1 parent 1b41cde commit 72f3f56

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

target_chains/ethereum/contracts/forge-test/utils/PythTestUtils.t.sol

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,7 @@ abstract contract PythTestUtils is Test, WormholeTestUtils, RandTestUtils {
277277
}
278278
}
279279

280-
contract PythTestUtilsTest is
281-
Test,
282-
WormholeTestUtils,
283-
PythTestUtils,
284-
IPythEvents
285-
{
280+
contract PythUtilsTest is Test, WormholeTestUtils, PythTestUtils, IPythEvents {
286281
function testConvertToUnit() public {
287282
// Price can't be negative
288283
vm.expectRevert();

target_chains/ethereum/sdk/solidity/PythUtils.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ library PythUtils {
77
/// @param expo The Pyth price exponent
88
/// @param targetDecimals The target number of decimals
99
/// @return The price as a uint256
10-
/// @dev Function will loose precision if targetDecimals is less than the Pyth price decimals
10+
/// @dev Function will lose precision if targetDecimals is less than the Pyth price decimals.
11+
/// This method will truncate any digits that cannot be represented by the targetDecimals.
1112
/// e.g. If the price is 0.000123 and the targetDecimals is 2, the result will be 0
1213
function convertToUint(
1314
int64 price,

0 commit comments

Comments
 (0)