Skip to content

Commit

Permalink
Add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
platfowner committed Dec 1, 2023
1 parent 9dc9b4e commit db3c4fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/common-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,9 @@ class CommonUtil {
gasAmount = 0; // Default gas amount = 0
}
let cost = gasPrice * gasPriceUnit * gasAmount;
// NOTE(platfowner): Apply gas cost flooring up-to 6 decimals.
if (isEnabledTimerFlag('allow_up_to_6_decimal_transfer_value_only', blockNumber)) {
cost = Math.floor(cost * 1000000) / 1000000;
cost = Math.floor(cost * 1000000) / 1000000; // gas cost flooring
}
return cost;
}
Expand Down

0 comments on commit db3c4fc

Please sign in to comment.