fix: underflow issue
This commit is contained in:
parent
f7699bb6b0
commit
7cbdcb562d
|
@ -101,7 +101,7 @@ contract OracleSwap {
|
|||
|
||||
uint8 priceDecimals = uint8(uint32(-1 * price.expo));
|
||||
|
||||
if (targetDecimals - priceDecimals >= 0) {
|
||||
if (targetDecimals >= priceDecimals) {
|
||||
return
|
||||
uint(uint64(price.price)) *
|
||||
10 ** uint32(targetDecimals - priceDecimals);
|
||||
|
|
Loading…
Reference in New Issue