@oydual31/more-vaults-sdk 1.1.19 → 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.
@@ -1325,7 +1325,8 @@ async function getVaultStatus(publicClient, vault) {
1325
1325
  { address: v, abi: VAULT_ABI, functionName: "asset" },
1326
1326
  { address: v, abi: VAULT_ABI, functionName: "totalAssets" },
1327
1327
  { address: v, abi: VAULT_ABI, functionName: "totalSupply" },
1328
- { address: v, abi: METADATA_ABI, functionName: "decimals" }
1328
+ { address: v, abi: METADATA_ABI, functionName: "decimals" },
1329
+ { address: v, abi: ADMIN_CONFIG_ABI, functionName: "depositCapacity" }
1329
1330
  ],
1330
1331
  allowFailure: true
1331
1332
  });
@@ -1341,6 +1342,7 @@ async function getVaultStatus(publicClient, vault) {
1341
1342
  const totalAssets = b1[9].status === "success" ? b1[9].result : 0n;
1342
1343
  const totalSupply = b1[10].status === "success" ? b1[10].result : 0n;
1343
1344
  const decimals = b1[11].status === "success" ? Number(b1[11].result) : 18;
1345
+ const depositCapacity = b1[12].status === "success" ? b1[12].result : 0n;
1344
1346
  const oneShare = 10n ** BigInt(decimals);
1345
1347
  const b2 = await publicClient.multicall({
1346
1348
  contracts: [
@@ -1356,10 +1358,11 @@ async function getVaultStatus(publicClient, vault) {
1356
1358
  const isCrossChainAsync = isHub && !oraclesEnabled;
1357
1359
  const depositAccessRestricted = maxDepositRaw === null && !isCrossChainAsync;
1358
1360
  const effectiveCapacity = maxDepositRaw === null ? MAX_UINT256 : maxDepositRaw;
1361
+ const isTrulyFull = effectiveCapacity === 0n && !isCrossChainAsync && (depositCapacity > 0n && totalAssets >= depositCapacity);
1359
1362
  let mode;
1360
1363
  if (isPaused) {
1361
1364
  mode = "paused";
1362
- } else if (effectiveCapacity === 0n) {
1365
+ } else if (isTrulyFull) {
1363
1366
  mode = "full";
1364
1367
  } else if (!isHub) {
1365
1368
  mode = "local";