@drift-labs/sdk 2.86.0-beta.2 → 2.86.0-beta.3

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.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.86.0-beta.2
1
+ 2.86.0-beta.3
@@ -47,7 +47,7 @@ class PollingDriftClientAccountSubscriber {
47
47
  this.oracleInfos = oracleInfos;
48
48
  }
49
49
  await this.updateAccountsToPoll();
50
- await this.updateOraclesToPoll();
50
+ this.updateOraclesToPoll();
51
51
  await this.addToAccountLoader();
52
52
  let subscriptionSucceeded = false;
53
53
  let retries = 0;
@@ -59,8 +59,7 @@ class PollingDriftClientAccountSubscriber {
59
59
  if (subscriptionSucceeded) {
60
60
  this.eventEmitter.emit('update');
61
61
  }
62
- await this.setPerpOracleMap();
63
- await this.setSpotOracleMap();
62
+ await Promise.all([this.setPerpOracleMap(), this.setSpotOracleMap()]);
64
63
  this.isSubscribing = false;
65
64
  this.isSubscribed = subscriptionSucceeded;
66
65
  this.subscriptionPromiseResolver(subscriptionSucceeded);
@@ -76,13 +75,15 @@ class PollingDriftClientAccountSubscriber {
76
75
  publicKey: statePublicKey,
77
76
  eventType: 'stateAccountUpdate',
78
77
  });
79
- await this.updatePerpMarketAccountsToPoll();
80
- await this.updateSpotMarketAccountsToPoll();
78
+ await Promise.all([
79
+ this.updatePerpMarketAccountsToPoll(),
80
+ this.updateSpotMarketAccountsToPoll(),
81
+ ]);
81
82
  }
82
83
  async updatePerpMarketAccountsToPoll() {
83
- for (const marketIndex of this.perpMarketIndexes) {
84
- await this.addPerpMarketAccountToPoll(marketIndex);
85
- }
84
+ await Promise.all(this.perpMarketIndexes.map((marketIndex) => {
85
+ return this.addPerpMarketAccountToPoll(marketIndex);
86
+ }));
86
87
  return true;
87
88
  }
88
89
  async addPerpMarketAccountToPoll(marketIndex) {
@@ -96,9 +97,9 @@ class PollingDriftClientAccountSubscriber {
96
97
  return true;
97
98
  }
98
99
  async updateSpotMarketAccountsToPoll() {
99
- for (const marketIndex of this.spotMarketIndexes) {
100
+ await Promise.all(this.spotMarketIndexes.map(async (marketIndex) => {
100
101
  await this.addSpotMarketAccountToPoll(marketIndex);
101
- }
102
+ }));
102
103
  return true;
103
104
  }
104
105
  async addSpotMarketAccountToPoll(marketIndex) {
@@ -127,12 +128,15 @@ class PollingDriftClientAccountSubscriber {
127
128
  return true;
128
129
  }
129
130
  async addToAccountLoader() {
131
+ const accountPromises = [];
130
132
  for (const [_, accountToPoll] of this.accountsToPoll) {
131
- await this.addAccountToAccountLoader(accountToPoll);
133
+ accountPromises.push(this.addAccountToAccountLoader(accountToPoll));
132
134
  }
135
+ const oraclePromises = [];
133
136
  for (const [_, oracleToPoll] of this.oraclesToPoll) {
134
- await this.addOracleToAccountLoader(oracleToPoll);
137
+ oraclePromises.push(this.addOracleToAccountLoader(oracleToPoll));
135
138
  }
139
+ await Promise.all([...accountPromises, ...oraclePromises]);
136
140
  this.errorCallbackId = this.accountLoader.addErrorCallbacks((error) => {
137
141
  this.eventEmitter.emit('error', error);
138
142
  });
@@ -284,33 +288,37 @@ class PollingDriftClientAccountSubscriber {
284
288
  }
285
289
  async setPerpOracleMap() {
286
290
  const perpMarkets = this.getMarketAccountsAndSlots();
291
+ const oraclePromises = [];
287
292
  for (const perpMarket of perpMarkets) {
288
293
  const perpMarketAccount = perpMarket.data;
289
294
  const perpMarketIndex = perpMarketAccount.marketIndex;
290
295
  const oracle = perpMarketAccount.amm.oracle;
291
296
  if (!this.oracles.has(oracle.toBase58())) {
292
- await this.addOracle({
297
+ oraclePromises.push(this.addOracle({
293
298
  publicKey: oracle,
294
299
  source: perpMarketAccount.amm.oracleSource,
295
- });
300
+ }));
296
301
  }
297
302
  this.perpOracleMap.set(perpMarketIndex, oracle);
298
303
  }
304
+ await Promise.all(oraclePromises);
299
305
  }
300
306
  async setSpotOracleMap() {
301
307
  const spotMarkets = this.getSpotMarketAccountsAndSlots();
308
+ const oraclePromises = [];
302
309
  for (const spotMarket of spotMarkets) {
303
310
  const spotMarketAccount = spotMarket.data;
304
311
  const spotMarketIndex = spotMarketAccount.marketIndex;
305
312
  const oracle = spotMarketAccount.oracle;
306
313
  if (!this.oracles.has(oracle.toBase58())) {
307
- await this.addOracle({
314
+ oraclePromises.push(this.addOracle({
308
315
  publicKey: oracle,
309
316
  source: spotMarketAccount.oracleSource,
310
- });
317
+ }));
311
318
  }
312
319
  this.spotOracleMap.set(spotMarketIndex, oracle);
313
320
  }
321
+ await Promise.all(oraclePromises);
314
322
  }
315
323
  assertIsSubscribed() {
316
324
  if (!this.isSubscribed) {
@@ -52,24 +52,23 @@ class WebSocketDriftClientAccountSubscriber {
52
52
  this.eventEmitter.emit('stateAccountUpdate', data);
53
53
  this.eventEmitter.emit('update');
54
54
  });
55
- // subscribe to market accounts
56
- await this.subscribeToPerpMarketAccounts();
57
- // subscribe to spot market accounts
58
- await this.subscribeToSpotMarketAccounts();
59
- // subscribe to oracles
60
- await this.subscribeToOracles();
55
+ await Promise.all([
56
+ // subscribe to market accounts
57
+ this.subscribeToPerpMarketAccounts(),
58
+ // subscribe to spot market accounts
59
+ this.subscribeToSpotMarketAccounts(),
60
+ // subscribe to oracles
61
+ this.subscribeToOracles(),
62
+ ]);
61
63
  this.eventEmitter.emit('update');
62
- await this.setPerpOracleMap();
63
- await this.setSpotOracleMap();
64
+ await Promise.all([this.setPerpOracleMap(), this.setSpotOracleMap()]);
64
65
  this.isSubscribing = false;
65
66
  this.isSubscribed = true;
66
67
  this.subscriptionPromiseResolver(true);
67
68
  return true;
68
69
  }
69
70
  async subscribeToPerpMarketAccounts() {
70
- for (const marketIndex of this.perpMarketIndexes) {
71
- await this.subscribeToPerpMarketAccount(marketIndex);
72
- }
71
+ await Promise.all(this.perpMarketIndexes.map((marketIndex) => this.subscribeToPerpMarketAccount(marketIndex)));
73
72
  return true;
74
73
  }
75
74
  async subscribeToPerpMarketAccount(marketIndex) {
@@ -83,9 +82,7 @@ class WebSocketDriftClientAccountSubscriber {
83
82
  return true;
84
83
  }
85
84
  async subscribeToSpotMarketAccounts() {
86
- for (const marketIndex of this.spotMarketIndexes) {
87
- await this.subscribeToSpotMarketAccount(marketIndex);
88
- }
85
+ await Promise.all(this.spotMarketIndexes.map((marketIndex) => this.subscribeToSpotMarketAccount(marketIndex)));
89
86
  return true;
90
87
  }
91
88
  async subscribeToSpotMarketAccount(marketIndex) {
@@ -99,11 +96,9 @@ class WebSocketDriftClientAccountSubscriber {
99
96
  return true;
100
97
  }
101
98
  async subscribeToOracles() {
102
- for (const oracleInfo of this.oracleInfos) {
103
- if (!oracleInfo.publicKey.equals(web3_js_1.PublicKey.default)) {
104
- await this.subscribeToOracle(oracleInfo);
105
- }
106
- }
99
+ await Promise.all(this.oracleInfos
100
+ .filter((oracleInfo) => !oracleInfo.publicKey.equals(web3_js_1.PublicKey.default))
101
+ .map((oracleInfo) => this.subscribeToOracle(oracleInfo)));
107
102
  return true;
108
103
  }
109
104
  async subscribeToOracle(oracleInfo) {
@@ -119,19 +114,13 @@ class WebSocketDriftClientAccountSubscriber {
119
114
  return true;
120
115
  }
121
116
  async unsubscribeFromMarketAccounts() {
122
- for (const accountSubscriber of this.perpMarketAccountSubscribers.values()) {
123
- await accountSubscriber.unsubscribe();
124
- }
117
+ await Promise.all(Array.from(this.perpMarketAccountSubscribers.values()).map((accountSubscriber) => accountSubscriber.unsubscribe()));
125
118
  }
126
119
  async unsubscribeFromSpotMarketAccounts() {
127
- for (const accountSubscriber of this.spotMarketAccountSubscribers.values()) {
128
- await accountSubscriber.unsubscribe();
129
- }
120
+ await Promise.all(Array.from(this.spotMarketAccountSubscribers.values()).map((accountSubscriber) => accountSubscriber.unsubscribe()));
130
121
  }
131
122
  async unsubscribeFromOracles() {
132
- for (const accountSubscriber of this.oracleSubscribers.values()) {
133
- await accountSubscriber.unsubscribe();
134
- }
123
+ await Promise.all(Array.from(this.oracleSubscribers.values()).map((accountSubscriber) => accountSubscriber.unsubscribe()));
135
124
  }
136
125
  async fetch() {
137
126
  if (!this.isSubscribed) {
@@ -179,6 +168,7 @@ class WebSocketDriftClientAccountSubscriber {
179
168
  }
180
169
  async setPerpOracleMap() {
181
170
  const perpMarkets = this.getMarketAccountsAndSlots();
171
+ const addOraclePromises = [];
182
172
  for (const perpMarket of perpMarkets) {
183
173
  if (!perpMarket) {
184
174
  continue;
@@ -187,16 +177,18 @@ class WebSocketDriftClientAccountSubscriber {
187
177
  const perpMarketIndex = perpMarketAccount.marketIndex;
188
178
  const oracle = perpMarketAccount.amm.oracle;
189
179
  if (!this.oracleSubscribers.has(oracle.toBase58())) {
190
- await this.addOracle({
180
+ addOraclePromises.push(this.addOracle({
191
181
  publicKey: oracle,
192
182
  source: perpMarket.data.amm.oracleSource,
193
- });
183
+ }));
194
184
  }
195
185
  this.perpOracleMap.set(perpMarketIndex, oracle);
196
186
  }
187
+ await Promise.all(addOraclePromises);
197
188
  }
198
189
  async setSpotOracleMap() {
199
190
  const spotMarkets = this.getSpotMarketAccountsAndSlots();
191
+ const addOraclePromises = [];
200
192
  for (const spotMarket of spotMarkets) {
201
193
  if (!spotMarket) {
202
194
  continue;
@@ -205,13 +197,14 @@ class WebSocketDriftClientAccountSubscriber {
205
197
  const spotMarketIndex = spotMarketAccount.marketIndex;
206
198
  const oracle = spotMarketAccount.oracle;
207
199
  if (!this.oracleSubscribers.has(oracle.toBase58())) {
208
- await this.addOracle({
200
+ addOraclePromises.push(this.addOracle({
209
201
  publicKey: oracle,
210
202
  source: spotMarketAccount.oracleSource,
211
- });
203
+ }));
212
204
  }
213
205
  this.spotOracleMap.set(spotMarketIndex, oracle);
214
206
  }
207
+ await Promise.all(addOraclePromises);
215
208
  }
216
209
  assertIsSubscribed() {
217
210
  if (!this.isSubscribed) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.86.0-beta.2",
3
+ "version": "2.86.0-beta.3",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -101,7 +101,7 @@ export class PollingDriftClientAccountSubscriber
101
101
  }
102
102
 
103
103
  await this.updateAccountsToPoll();
104
- await this.updateOraclesToPoll();
104
+ this.updateOraclesToPoll();
105
105
  await this.addToAccountLoader();
106
106
 
107
107
  let subscriptionSucceeded = false;
@@ -116,8 +116,7 @@ export class PollingDriftClientAccountSubscriber
116
116
  this.eventEmitter.emit('update');
117
117
  }
118
118
 
119
- await this.setPerpOracleMap();
120
- await this.setSpotOracleMap();
119
+ await Promise.all([this.setPerpOracleMap(), this.setSpotOracleMap()]);
121
120
 
122
121
  this.isSubscribing = false;
123
122
  this.isSubscribed = subscriptionSucceeded;
@@ -141,14 +140,18 @@ export class PollingDriftClientAccountSubscriber
141
140
  eventType: 'stateAccountUpdate',
142
141
  });
143
142
 
144
- await this.updatePerpMarketAccountsToPoll();
145
- await this.updateSpotMarketAccountsToPoll();
143
+ await Promise.all([
144
+ this.updatePerpMarketAccountsToPoll(),
145
+ this.updateSpotMarketAccountsToPoll(),
146
+ ]);
146
147
  }
147
148
 
148
149
  async updatePerpMarketAccountsToPoll(): Promise<boolean> {
149
- for (const marketIndex of this.perpMarketIndexes) {
150
- await this.addPerpMarketAccountToPoll(marketIndex);
151
- }
150
+ await Promise.all(
151
+ this.perpMarketIndexes.map((marketIndex) => {
152
+ return this.addPerpMarketAccountToPoll(marketIndex);
153
+ })
154
+ );
152
155
  return true;
153
156
  }
154
157
 
@@ -169,9 +172,11 @@ export class PollingDriftClientAccountSubscriber
169
172
  }
170
173
 
171
174
  async updateSpotMarketAccountsToPoll(): Promise<boolean> {
172
- for (const marketIndex of this.spotMarketIndexes) {
173
- await this.addSpotMarketAccountToPoll(marketIndex);
174
- }
175
+ await Promise.all(
176
+ this.spotMarketIndexes.map(async (marketIndex) => {
177
+ await this.addSpotMarketAccountToPoll(marketIndex);
178
+ })
179
+ );
175
180
 
176
181
  return true;
177
182
  }
@@ -209,16 +214,19 @@ export class PollingDriftClientAccountSubscriber
209
214
 
210
215
  return true;
211
216
  }
212
-
213
217
  async addToAccountLoader(): Promise<void> {
218
+ const accountPromises = [];
214
219
  for (const [_, accountToPoll] of this.accountsToPoll) {
215
- await this.addAccountToAccountLoader(accountToPoll);
220
+ accountPromises.push(this.addAccountToAccountLoader(accountToPoll));
216
221
  }
217
222
 
223
+ const oraclePromises = [];
218
224
  for (const [_, oracleToPoll] of this.oraclesToPoll) {
219
- await this.addOracleToAccountLoader(oracleToPoll);
225
+ oraclePromises.push(this.addOracleToAccountLoader(oracleToPoll));
220
226
  }
221
227
 
228
+ await Promise.all([...accountPromises, ...oraclePromises]);
229
+
222
230
  this.errorCallbackId = this.accountLoader.addErrorCallbacks((error) => {
223
231
  this.eventEmitter.emit('error', error);
224
232
  });
@@ -446,37 +454,44 @@ export class PollingDriftClientAccountSubscriber
446
454
  }
447
455
  console.log(`Pausing to find oracle ${oracle} failed`);
448
456
  }
449
-
450
457
  async setPerpOracleMap() {
451
458
  const perpMarkets = this.getMarketAccountsAndSlots();
459
+ const oraclePromises = [];
452
460
  for (const perpMarket of perpMarkets) {
453
461
  const perpMarketAccount = perpMarket.data;
454
462
  const perpMarketIndex = perpMarketAccount.marketIndex;
455
463
  const oracle = perpMarketAccount.amm.oracle;
456
464
  if (!this.oracles.has(oracle.toBase58())) {
457
- await this.addOracle({
458
- publicKey: oracle,
459
- source: perpMarketAccount.amm.oracleSource,
460
- });
465
+ oraclePromises.push(
466
+ this.addOracle({
467
+ publicKey: oracle,
468
+ source: perpMarketAccount.amm.oracleSource,
469
+ })
470
+ );
461
471
  }
462
472
  this.perpOracleMap.set(perpMarketIndex, oracle);
463
473
  }
474
+ await Promise.all(oraclePromises);
464
475
  }
465
476
 
466
477
  async setSpotOracleMap() {
467
478
  const spotMarkets = this.getSpotMarketAccountsAndSlots();
479
+ const oraclePromises = [];
468
480
  for (const spotMarket of spotMarkets) {
469
481
  const spotMarketAccount = spotMarket.data;
470
482
  const spotMarketIndex = spotMarketAccount.marketIndex;
471
483
  const oracle = spotMarketAccount.oracle;
472
484
  if (!this.oracles.has(oracle.toBase58())) {
473
- await this.addOracle({
474
- publicKey: oracle,
475
- source: spotMarketAccount.oracleSource,
476
- });
485
+ oraclePromises.push(
486
+ this.addOracle({
487
+ publicKey: oracle,
488
+ source: spotMarketAccount.oracleSource,
489
+ })
490
+ );
477
491
  }
478
492
  this.spotOracleMap.set(spotMarketIndex, oracle);
479
493
  }
494
+ await Promise.all(oraclePromises);
480
495
  }
481
496
 
482
497
  assertIsSubscribed(): void {
@@ -115,19 +115,18 @@ export class WebSocketDriftClientAccountSubscriber
115
115
  this.eventEmitter.emit('update');
116
116
  });
117
117
 
118
- // subscribe to market accounts
119
- await this.subscribeToPerpMarketAccounts();
120
-
121
- // subscribe to spot market accounts
122
- await this.subscribeToSpotMarketAccounts();
123
-
124
- // subscribe to oracles
125
- await this.subscribeToOracles();
118
+ await Promise.all([
119
+ // subscribe to market accounts
120
+ this.subscribeToPerpMarketAccounts(),
121
+ // subscribe to spot market accounts
122
+ this.subscribeToSpotMarketAccounts(),
123
+ // subscribe to oracles
124
+ this.subscribeToOracles(),
125
+ ]);
126
126
 
127
127
  this.eventEmitter.emit('update');
128
128
 
129
- await this.setPerpOracleMap();
130
- await this.setSpotOracleMap();
129
+ await Promise.all([this.setPerpOracleMap(), this.setSpotOracleMap()]);
131
130
 
132
131
  this.isSubscribing = false;
133
132
  this.isSubscribed = true;
@@ -137,9 +136,11 @@ export class WebSocketDriftClientAccountSubscriber
137
136
  }
138
137
 
139
138
  async subscribeToPerpMarketAccounts(): Promise<boolean> {
140
- for (const marketIndex of this.perpMarketIndexes) {
141
- await this.subscribeToPerpMarketAccount(marketIndex);
142
- }
139
+ await Promise.all(
140
+ this.perpMarketIndexes.map((marketIndex) =>
141
+ this.subscribeToPerpMarketAccount(marketIndex)
142
+ )
143
+ );
143
144
  return true;
144
145
  }
145
146
 
@@ -165,9 +166,11 @@ export class WebSocketDriftClientAccountSubscriber
165
166
  }
166
167
 
167
168
  async subscribeToSpotMarketAccounts(): Promise<boolean> {
168
- for (const marketIndex of this.spotMarketIndexes) {
169
- await this.subscribeToSpotMarketAccount(marketIndex);
170
- }
169
+ await Promise.all(
170
+ this.spotMarketIndexes.map((marketIndex) =>
171
+ this.subscribeToSpotMarketAccount(marketIndex)
172
+ )
173
+ );
171
174
  return true;
172
175
  }
173
176
 
@@ -193,11 +196,11 @@ export class WebSocketDriftClientAccountSubscriber
193
196
  }
194
197
 
195
198
  async subscribeToOracles(): Promise<boolean> {
196
- for (const oracleInfo of this.oracleInfos) {
197
- if (!oracleInfo.publicKey.equals(PublicKey.default)) {
198
- await this.subscribeToOracle(oracleInfo);
199
- }
200
- }
199
+ await Promise.all(
200
+ this.oracleInfos
201
+ .filter((oracleInfo) => !oracleInfo.publicKey.equals(PublicKey.default))
202
+ .map((oracleInfo) => this.subscribeToOracle(oracleInfo))
203
+ );
201
204
 
202
205
  return true;
203
206
  }
@@ -232,21 +235,27 @@ export class WebSocketDriftClientAccountSubscriber
232
235
  }
233
236
 
234
237
  async unsubscribeFromMarketAccounts(): Promise<void> {
235
- for (const accountSubscriber of this.perpMarketAccountSubscribers.values()) {
236
- await accountSubscriber.unsubscribe();
237
- }
238
+ await Promise.all(
239
+ Array.from(this.perpMarketAccountSubscribers.values()).map(
240
+ (accountSubscriber) => accountSubscriber.unsubscribe()
241
+ )
242
+ );
238
243
  }
239
244
 
240
245
  async unsubscribeFromSpotMarketAccounts(): Promise<void> {
241
- for (const accountSubscriber of this.spotMarketAccountSubscribers.values()) {
242
- await accountSubscriber.unsubscribe();
243
- }
246
+ await Promise.all(
247
+ Array.from(this.spotMarketAccountSubscribers.values()).map(
248
+ (accountSubscriber) => accountSubscriber.unsubscribe()
249
+ )
250
+ );
244
251
  }
245
252
 
246
253
  async unsubscribeFromOracles(): Promise<void> {
247
- for (const accountSubscriber of this.oracleSubscribers.values()) {
248
- await accountSubscriber.unsubscribe();
249
- }
254
+ await Promise.all(
255
+ Array.from(this.oracleSubscribers.values()).map((accountSubscriber) =>
256
+ accountSubscriber.unsubscribe()
257
+ )
258
+ );
250
259
  }
251
260
 
252
261
  public async fetch(): Promise<void> {
@@ -315,6 +324,7 @@ export class WebSocketDriftClientAccountSubscriber
315
324
 
316
325
  async setPerpOracleMap() {
317
326
  const perpMarkets = this.getMarketAccountsAndSlots();
327
+ const addOraclePromises = [];
318
328
  for (const perpMarket of perpMarkets) {
319
329
  if (!perpMarket) {
320
330
  continue;
@@ -323,17 +333,21 @@ export class WebSocketDriftClientAccountSubscriber
323
333
  const perpMarketIndex = perpMarketAccount.marketIndex;
324
334
  const oracle = perpMarketAccount.amm.oracle;
325
335
  if (!this.oracleSubscribers.has(oracle.toBase58())) {
326
- await this.addOracle({
327
- publicKey: oracle,
328
- source: perpMarket.data.amm.oracleSource,
329
- });
336
+ addOraclePromises.push(
337
+ this.addOracle({
338
+ publicKey: oracle,
339
+ source: perpMarket.data.amm.oracleSource,
340
+ })
341
+ );
330
342
  }
331
343
  this.perpOracleMap.set(perpMarketIndex, oracle);
332
344
  }
345
+ await Promise.all(addOraclePromises);
333
346
  }
334
347
 
335
348
  async setSpotOracleMap() {
336
349
  const spotMarkets = this.getSpotMarketAccountsAndSlots();
350
+ const addOraclePromises = [];
337
351
  for (const spotMarket of spotMarkets) {
338
352
  if (!spotMarket) {
339
353
  continue;
@@ -342,13 +356,16 @@ export class WebSocketDriftClientAccountSubscriber
342
356
  const spotMarketIndex = spotMarketAccount.marketIndex;
343
357
  const oracle = spotMarketAccount.oracle;
344
358
  if (!this.oracleSubscribers.has(oracle.toBase58())) {
345
- await this.addOracle({
346
- publicKey: oracle,
347
- source: spotMarketAccount.oracleSource,
348
- });
359
+ addOraclePromises.push(
360
+ this.addOracle({
361
+ publicKey: oracle,
362
+ source: spotMarketAccount.oracleSource,
363
+ })
364
+ );
349
365
  }
350
366
  this.spotOracleMap.set(spotMarketIndex, oracle);
351
367
  }
368
+ await Promise.all(addOraclePromises);
352
369
  }
353
370
 
354
371
  assertIsSubscribed(): void {