@gearbox-protocol/sdk 15.0.0-next.1 → 15.0.0-next.2

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.
@@ -456,7 +456,7 @@ class CreditAccountsServiceV310 extends import_base.SDKConstruct {
456
456
  /**
457
457
  * {@inheritDoc ICreditAccountsService.calcMinSeizedAmount}
458
458
  */
459
- async calcMinSeizedAmount(props) {
459
+ calcMinSeizedAmount(props) {
460
460
  const { account, token, repaidAmount } = props;
461
461
  const market = this.sdk.marketRegister.findByCreditManager(
462
462
  account.creditManager
@@ -465,7 +465,7 @@ class CreditAccountsServiceV310 extends import_base.SDKConstruct {
465
465
  account.creditManager
466
466
  );
467
467
  const fee = suite.isExpired ? suite.creditManager.liquidationDiscountExpired : suite.creditManager.liquidationDiscount;
468
- const tokenAmount = await market.priceOracle.updateAndConvert(
468
+ const tokenAmount = market.priceOracle.convert(
469
469
  market.underlying,
470
470
  token,
471
471
  repaidAmount
@@ -451,7 +451,7 @@ class CreditAccountsServiceV310 extends SDKConstruct {
451
451
  /**
452
452
  * {@inheritDoc ICreditAccountsService.calcMinSeizedAmount}
453
453
  */
454
- async calcMinSeizedAmount(props) {
454
+ calcMinSeizedAmount(props) {
455
455
  const { account, token, repaidAmount } = props;
456
456
  const market = this.sdk.marketRegister.findByCreditManager(
457
457
  account.creditManager
@@ -460,7 +460,7 @@ class CreditAccountsServiceV310 extends SDKConstruct {
460
460
  account.creditManager
461
461
  );
462
462
  const fee = suite.isExpired ? suite.creditManager.liquidationDiscountExpired : suite.creditManager.liquidationDiscount;
463
- const tokenAmount = await market.priceOracle.updateAndConvert(
463
+ const tokenAmount = market.priceOracle.convert(
464
464
  market.underlying,
465
465
  token,
466
466
  repaidAmount
@@ -67,7 +67,7 @@ export declare class CreditAccountsServiceV310 extends SDKConstruct implements I
67
67
  /**
68
68
  * {@inheritDoc ICreditAccountsService.calcMinSeizedAmount}
69
69
  */
70
- calcMinSeizedAmount(props: PartiallyLiquidateProps): Promise<bigint>;
70
+ calcMinSeizedAmount(props: PartiallyLiquidateProps): bigint;
71
71
  /**
72
72
  * {@inheritDoc ICreditAccountsService.partiallyLiquidate}
73
73
  */
@@ -723,7 +723,7 @@ export interface ICreditAccountsService extends Construct {
723
723
  * @param props - {@link CalcMinSeizedAmountProps}
724
724
  * @returns Minimum amount of collateral token to seize
725
725
  */
726
- calcMinSeizedAmount(props: CalcMinSeizedAmountProps): Promise<bigint>;
726
+ calcMinSeizedAmount(props: CalcMinSeizedAmountProps): bigint;
727
727
  /**
728
728
  * Generates transaction to partially liquidate credit account;
729
729
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "15.0.0-next.1",
3
+ "version": "15.0.0-next.2",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",