@gearbox-protocol/sdk 3.0.0-next.92 → 3.0.0-next.93

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.
@@ -80,8 +80,7 @@ export declare class CreditAccountData {
80
80
  static amountAbcComparator(t1: bigint, t2: bigint): 1 | -1;
81
81
  isForbidden(token: string): boolean;
82
82
  isQuoted(token: string): boolean;
83
- isTokenEnabled(index: number): boolean;
84
- static isTokenEnabled(index: number, enabledTokenMask: bigint): boolean;
83
+ isTokenEnabled(token: string): boolean;
85
84
  static calcMaxDebtIncrease(healthFactor: number, borrowAmountPlusInterest: bigint, underlyingLT: number, minHf?: number): bigint;
86
85
  static calcOverallAPY({ caAssets, lpAPY, prices, quotas, quotaRates, totalValue, debt, baseBorrowRate, underlyingToken, }: CalcOverallAPYProps): bigint | undefined;
87
86
  hash(): string;
@@ -129,11 +129,8 @@ class CreditAccountData {
129
129
  isQuoted(token) {
130
130
  return !!this.quotedTokens[token];
131
131
  }
132
- isTokenEnabled(index) {
133
- return ((2n ** BigInt(index)) & this.enabledTokenMask) !== 0n;
134
- }
135
- static isTokenEnabled(index, enabledTokenMask) {
136
- return ((2n ** BigInt(index)) & enabledTokenMask) !== 0n;
132
+ isTokenEnabled(token) {
133
+ return this.allBalances[token].isEnabled;
137
134
  }
138
135
  static calcMaxDebtIncrease(healthFactor, borrowAmountPlusInterest, underlyingLT, minHf = Number(sdk_gov_1.PERCENTAGE_FACTOR)) {
139
136
  const result = (borrowAmountPlusInterest * BigInt(healthFactor - minHf)) /
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "3.0.0-next.92",
3
+ "version": "3.0.0-next.93",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",