@oydual31/more-vaults-sdk 1.1.20 → 1.1.21

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.
@@ -1515,7 +1515,8 @@ async function getVaultStatus(publicClient, vault) {
1515
1515
  { address: v, abi: VAULT_ABI, functionName: "asset" },
1516
1516
  { address: v, abi: VAULT_ABI, functionName: "totalAssets" },
1517
1517
  { address: v, abi: VAULT_ABI, functionName: "totalSupply" },
1518
- { address: v, abi: METADATA_ABI, functionName: "decimals" }
1518
+ { address: v, abi: METADATA_ABI, functionName: "decimals" },
1519
+ { address: v, abi: ADMIN_CONFIG_ABI, functionName: "depositCapacity" }
1519
1520
  ],
1520
1521
  allowFailure: true
1521
1522
  });
@@ -1531,6 +1532,7 @@ async function getVaultStatus(publicClient, vault) {
1531
1532
  const totalAssets = b1[9].status === "success" ? b1[9].result : 0n;
1532
1533
  const totalSupply = b1[10].status === "success" ? b1[10].result : 0n;
1533
1534
  const decimals = b1[11].status === "success" ? Number(b1[11].result) : 18;
1535
+ const depositCapacity = b1[12].status === "success" ? b1[12].result : 0n;
1534
1536
  const oneShare = 10n ** BigInt(decimals);
1535
1537
  const b2 = await publicClient.multicall({
1536
1538
  contracts: [
@@ -1546,10 +1548,11 @@ async function getVaultStatus(publicClient, vault) {
1546
1548
  const isCrossChainAsync = isHub && !oraclesEnabled;
1547
1549
  const depositAccessRestricted = maxDepositRaw === null && !isCrossChainAsync;
1548
1550
  const effectiveCapacity = maxDepositRaw === null ? MAX_UINT256 : maxDepositRaw;
1551
+ const isTrulyFull = effectiveCapacity === 0n && !isCrossChainAsync && (depositCapacity > 0n && totalAssets >= depositCapacity);
1549
1552
  let mode;
1550
1553
  if (isPaused) {
1551
1554
  mode = "paused";
1552
- } else if (effectiveCapacity === 0n) {
1555
+ } else if (isTrulyFull) {
1553
1556
  mode = "full";
1554
1557
  } else if (!isHub) {
1555
1558
  mode = "local";