@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.js CHANGED
@@ -3224,7 +3224,11 @@ async function getOperatorCeilings(publicClient, vaultAddress) {
3224
3224
  }
3225
3225
  function operatorMaxDrainPerDay(ceilings) {
3226
3226
  const { maxOperatorBots, maxBotDailyLimit, vaultDailyAggregate } = ceilings;
3227
- if (maxOperatorBots === 0n || maxBotDailyLimit === 0n) return 0;
3227
+ if (maxOperatorBots === 0n) return 0;
3228
+ if (maxBotDailyLimit === 0n) {
3229
+ if (vaultDailyAggregate > 0n) return Number(vaultDailyAggregate) / 1e6;
3230
+ return Infinity;
3231
+ }
3228
3232
  const theoretical = maxOperatorBots * maxBotDailyLimit;
3229
3233
  const raw = vaultDailyAggregate > 0n && vaultDailyAggregate < theoretical ? vaultDailyAggregate : theoretical;
3230
3234
  return Number(raw) / 1e6;