@axonfi/sdk 0.13.0 → 0.14.0
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/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3226,7 +3226,11 @@ async function getOperatorCeilings(publicClient, vaultAddress) {
|
|
|
3226
3226
|
}
|
|
3227
3227
|
function operatorMaxDrainPerDay(ceilings) {
|
|
3228
3228
|
const { maxOperatorBots, maxBotDailyLimit, vaultDailyAggregate } = ceilings;
|
|
3229
|
-
if (maxOperatorBots === 0n
|
|
3229
|
+
if (maxOperatorBots === 0n) return 0;
|
|
3230
|
+
if (maxBotDailyLimit === 0n) {
|
|
3231
|
+
if (vaultDailyAggregate > 0n) return Number(vaultDailyAggregate) / 1e6;
|
|
3232
|
+
return Infinity;
|
|
3233
|
+
}
|
|
3230
3234
|
const theoretical = maxOperatorBots * maxBotDailyLimit;
|
|
3231
3235
|
const raw = vaultDailyAggregate > 0n && vaultDailyAggregate < theoretical ? vaultDailyAggregate : theoretical;
|
|
3232
3236
|
return Number(raw) / 1e6;
|