@aurigami/sdk 1.6.3 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1138,9 +1138,13 @@ function getDecimal(address) {
1138
1138
  return decimalRecords[addressLowercase];
1139
1139
  }
1140
1140
  function calcLMRewardApr(rewardsValue, totalStakeValue, frequencyPerYear) {
1141
+ if (rewardsValue.isZero()) {
1142
+ return new BigNumber(0);
1143
+ }
1144
+
1141
1145
  if (totalStakeValue.lte(0)) {
1142
1146
  // avoid division by zero when there is no stake
1143
- return new BigNumber('999999999');
1147
+ return rewardsValue;
1144
1148
  }
1145
1149
 
1146
1150
  return rewardsValue.multipliedBy(frequencyPerYear).dividedBy(totalStakeValue);