@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.cjs.development.js +5 -1
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +5 -1
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/helpers/helpers.ts +4 -1
|
@@ -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
|
|
1147
|
+
return rewardsValue;
|
|
1144
1148
|
}
|
|
1145
1149
|
|
|
1146
1150
|
return rewardsValue.multipliedBy(frequencyPerYear).dividedBy(totalStakeValue);
|