@gearbox-protocol/sdk 14.12.0-next.25 → 14.12.0-next.26

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.
@@ -591,13 +591,6 @@ class CreditAccountsServiceV310 extends import_base.SDKConstruct {
591
591
  closePath
592
592
  }) {
593
593
  const cm = this.sdk.marketRegister.findCreditManager(ca.creditManager);
594
- await this.sdk.tokensMeta.loadTokenData(cm.underlying);
595
- const underlying = this.sdk.tokensMeta.mustGet(cm.underlying);
596
- if (this.sdk.tokensMeta.isRWAUnderlying(underlying)) {
597
- throw new Error(
598
- "closeCreditAccount is not supported for RWA underlying credit accounts"
599
- );
600
- }
601
594
  const routerCloseResult = closePath || await this.sdk.routerFor(ca).findBestClosePath({
602
595
  creditAccount: ca,
603
596
  creditManager: cm.creditManager,
@@ -627,14 +620,6 @@ class CreditAccountsServiceV310 extends import_base.SDKConstruct {
627
620
  assetsToWithdraw,
628
621
  to
629
622
  }) {
630
- const cm = this.sdk.marketRegister.findCreditManager(ca.creditManager);
631
- await this.sdk.tokensMeta.loadTokenData(cm.underlying);
632
- const underlying = this.sdk.tokensMeta.mustGet(cm.underlying);
633
- if (this.sdk.tokensMeta.isRWAUnderlying(underlying)) {
634
- throw new Error(
635
- "closeCreditAccount is not supported for RWA underlying credit accounts"
636
- );
637
- }
638
623
  return [
639
624
  ...routerCalls,
640
625
  ...this.#prepareDisableQuotas(ca),
@@ -587,13 +587,6 @@ class CreditAccountsServiceV310 extends SDKConstruct {
587
587
  closePath
588
588
  }) {
589
589
  const cm = this.sdk.marketRegister.findCreditManager(ca.creditManager);
590
- await this.sdk.tokensMeta.loadTokenData(cm.underlying);
591
- const underlying = this.sdk.tokensMeta.mustGet(cm.underlying);
592
- if (this.sdk.tokensMeta.isRWAUnderlying(underlying)) {
593
- throw new Error(
594
- "closeCreditAccount is not supported for RWA underlying credit accounts"
595
- );
596
- }
597
590
  const routerCloseResult = closePath || await this.sdk.routerFor(ca).findBestClosePath({
598
591
  creditAccount: ca,
599
592
  creditManager: cm.creditManager,
@@ -623,14 +616,6 @@ class CreditAccountsServiceV310 extends SDKConstruct {
623
616
  assetsToWithdraw,
624
617
  to
625
618
  }) {
626
- const cm = this.sdk.marketRegister.findCreditManager(ca.creditManager);
627
- await this.sdk.tokensMeta.loadTokenData(cm.underlying);
628
- const underlying = this.sdk.tokensMeta.mustGet(cm.underlying);
629
- if (this.sdk.tokensMeta.isRWAUnderlying(underlying)) {
630
- throw new Error(
631
- "closeCreditAccount is not supported for RWA underlying credit accounts"
632
- );
633
- }
634
619
  return [
635
620
  ...routerCalls,
636
621
  ...this.#prepareDisableQuotas(ca),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "14.12.0-next.25",
3
+ "version": "14.12.0-next.26",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "repository": {