@gearbox-protocol/sdk 14.1.0 → 14.1.1

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.
@@ -40,7 +40,9 @@ class KYCRegistry extends import_base.SDKConstruct {
40
40
  * @param kycFactories - KYC factory contracts to query.
41
41
  */
42
42
  getLoadMulticalls(configurators, kycFactories = []) {
43
- if (!kycFactories.length) return [];
43
+ if (!kycFactories.length) {
44
+ return [];
45
+ }
44
46
  const [kycCompressorAddress] = this.sdk.addressProvider.mustGetLatest(
45
47
  import_constants.AP_KYC_COMPRESSOR,
46
48
  import_constants.VERSION_RANGE_310
@@ -68,14 +70,17 @@ class KYCRegistry extends import_base.SDKConstruct {
68
70
  * When omitted, all loaded factories are used.
69
71
  */
70
72
  async getInvestorData(investor, factories_) {
71
- const [kycCompressorAddress] = this.sdk.addressProvider.mustGetLatest(
72
- import_constants.AP_KYC_COMPRESSOR,
73
- import_constants.VERSION_RANGE_310
74
- );
75
73
  let factories = this.#factories.values();
76
74
  if (factories_?.length) {
77
75
  factories = factories_.map((f) => this.#factories.mustGet(f));
78
76
  }
77
+ if (!factories.length) {
78
+ return [];
79
+ }
80
+ const [kycCompressorAddress] = this.sdk.addressProvider.mustGetLatest(
81
+ import_constants.AP_KYC_COMPRESSOR,
82
+ import_constants.VERSION_RANGE_310
83
+ );
79
84
  const resp = await this.client.readContract({
80
85
  abi: import_iKYCCompressor.iKYCCompressorAbi,
81
86
  address: kycCompressorAddress,
@@ -25,7 +25,9 @@ class KYCRegistry extends SDKConstruct {
25
25
  * @param kycFactories - KYC factory contracts to query.
26
26
  */
27
27
  getLoadMulticalls(configurators, kycFactories = []) {
28
- if (!kycFactories.length) return [];
28
+ if (!kycFactories.length) {
29
+ return [];
30
+ }
29
31
  const [kycCompressorAddress] = this.sdk.addressProvider.mustGetLatest(
30
32
  AP_KYC_COMPRESSOR,
31
33
  VERSION_RANGE_310
@@ -53,14 +55,17 @@ class KYCRegistry extends SDKConstruct {
53
55
  * When omitted, all loaded factories are used.
54
56
  */
55
57
  async getInvestorData(investor, factories_) {
56
- const [kycCompressorAddress] = this.sdk.addressProvider.mustGetLatest(
57
- AP_KYC_COMPRESSOR,
58
- VERSION_RANGE_310
59
- );
60
58
  let factories = this.#factories.values();
61
59
  if (factories_?.length) {
62
60
  factories = factories_.map((f) => this.#factories.mustGet(f));
63
61
  }
62
+ if (!factories.length) {
63
+ return [];
64
+ }
65
+ const [kycCompressorAddress] = this.sdk.addressProvider.mustGetLatest(
66
+ AP_KYC_COMPRESSOR,
67
+ VERSION_RANGE_310
68
+ );
64
69
  const resp = await this.client.readContract({
65
70
  abi: iKYCCompressorAbi,
66
71
  address: kycCompressorAddress,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "14.1.0",
3
+ "version": "14.1.1",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",