@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.
package/dist/sdk.esm.js CHANGED
@@ -1133,9 +1133,13 @@ function getDecimal(address) {
1133
1133
  return decimalRecords[addressLowercase];
1134
1134
  }
1135
1135
  function calcLMRewardApr(rewardsValue, totalStakeValue, frequencyPerYear) {
1136
+ if (rewardsValue.isZero()) {
1137
+ return new BigNumber(0);
1138
+ }
1139
+
1136
1140
  if (totalStakeValue.lte(0)) {
1137
1141
  // avoid division by zero when there is no stake
1138
- return new BigNumber('999999999');
1142
+ return rewardsValue;
1139
1143
  }
1140
1144
 
1141
1145
  return rewardsValue.multipliedBy(frequencyPerYear).dividedBy(totalStakeValue);