@atomiqlabs/chain-solana 12.0.13 → 12.0.14
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.
|
@@ -141,7 +141,7 @@ class SolanaEvents extends SolanaModule_1.SolanaModule {
|
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
143
|
}),
|
|
144
|
-
paginationToken: response.result.
|
|
144
|
+
paginationToken: response.result.paginationToken
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
147
|
async _findInTxsTFA(topicKey, processor, abortSignal, startBlockheight) {
|
|
@@ -164,6 +164,12 @@ class SolanaEvents extends SolanaModule_1.SolanaModule {
|
|
|
164
164
|
}
|
|
165
165
|
txs = tfaResult.data;
|
|
166
166
|
paginationToken = tfaResult.paginationToken;
|
|
167
|
+
if (txs.length === 0) {
|
|
168
|
+
this.logger.debug(`_findInTxsTFA(): Got ${txs.length} txns (empty response), paginationToken: ${paginationToken}`);
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
this.logger.debug(`_findInTxsTFA(): Got ${txs.length} txns (${txs[0]}..${txs[txs.length - 1]}), paginationToken: ${paginationToken}`);
|
|
172
|
+
}
|
|
167
173
|
if (abortSignal != null)
|
|
168
174
|
abortSignal.throwIfAborted();
|
|
169
175
|
const result = await processor({ txs });
|
|
@@ -197,6 +203,12 @@ class SolanaEvents extends SolanaModule_1.SolanaModule {
|
|
|
197
203
|
if (endIndex !== -1)
|
|
198
204
|
signatures = signatures.slice(0, endIndex - 1);
|
|
199
205
|
}
|
|
206
|
+
if (signatures.length === 0) {
|
|
207
|
+
this.logger.debug(`_findInSignatures(): Got ${signatures.length} txns (empty response)`);
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
this.logger.debug(`_findInSignatures(): Got ${signatures.length} txns (${signatures[0]}..${signatures[signatures.length - 1]})`);
|
|
211
|
+
}
|
|
200
212
|
if (abortSignal != null)
|
|
201
213
|
abortSignal.throwIfAborted();
|
|
202
214
|
const result = await processor({ signatures });
|
|
@@ -218,6 +230,7 @@ class SolanaEvents extends SolanaModule_1.SolanaModule {
|
|
|
218
230
|
throw new Error("Helius gTFA is not supported with current provider!");
|
|
219
231
|
//If set to auto, we can manually set to "no"
|
|
220
232
|
this.usingHeliusTFA = "no";
|
|
233
|
+
this.logger.warn("findInSignatures(): Helius gTFA is not supported, switching back to using gSFA!");
|
|
221
234
|
}
|
|
222
235
|
return await this._findInSignatures(topicKey, processor, abortSignal, logFetchLimit, startBlockheight);
|
|
223
236
|
}
|
package/package.json
CHANGED
|
@@ -156,7 +156,7 @@ export class SolanaEvents extends SolanaModule {
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
}),
|
|
159
|
-
paginationToken: response.result.
|
|
159
|
+
paginationToken: response.result.paginationToken
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
162
|
|
|
@@ -191,6 +191,12 @@ export class SolanaEvents extends SolanaModule {
|
|
|
191
191
|
txs = tfaResult.data;
|
|
192
192
|
paginationToken = tfaResult.paginationToken;
|
|
193
193
|
|
|
194
|
+
if(txs.length===0) {
|
|
195
|
+
this.logger.debug(`_findInTxsTFA(): Got ${txs.length} txns (empty response), paginationToken: ${paginationToken}`);
|
|
196
|
+
} else {
|
|
197
|
+
this.logger.debug(`_findInTxsTFA(): Got ${txs.length} txns (${txs[0]}..${txs[txs.length-1]}), paginationToken: ${paginationToken}`);
|
|
198
|
+
}
|
|
199
|
+
|
|
194
200
|
if(abortSignal!=null) abortSignal.throwIfAborted();
|
|
195
201
|
const result: T = await processor({txs});
|
|
196
202
|
if(result!=null) return result;
|
|
@@ -226,6 +232,13 @@ export class SolanaEvents extends SolanaModule {
|
|
|
226
232
|
if(endIndex===0) return null;
|
|
227
233
|
if(endIndex!==-1) signatures = signatures.slice(0, endIndex - 1);
|
|
228
234
|
}
|
|
235
|
+
|
|
236
|
+
if(signatures.length===0) {
|
|
237
|
+
this.logger.debug(`_findInSignatures(): Got ${signatures.length} txns (empty response)`);
|
|
238
|
+
} else {
|
|
239
|
+
this.logger.debug(`_findInSignatures(): Got ${signatures.length} txns (${signatures[0]}..${signatures[signatures.length-1]})`);
|
|
240
|
+
}
|
|
241
|
+
|
|
229
242
|
if(abortSignal!=null) abortSignal.throwIfAborted();
|
|
230
243
|
const result: T = await processor({signatures});
|
|
231
244
|
if(result!=null) return result;
|
|
@@ -250,6 +263,7 @@ export class SolanaEvents extends SolanaModule {
|
|
|
250
263
|
if(this.usingHeliusTFA==="yes") throw new Error("Helius gTFA is not supported with current provider!");
|
|
251
264
|
//If set to auto, we can manually set to "no"
|
|
252
265
|
this.usingHeliusTFA = "no";
|
|
266
|
+
this.logger.warn("findInSignatures(): Helius gTFA is not supported, switching back to using gSFA!")
|
|
253
267
|
}
|
|
254
268
|
return await this._findInSignatures(topicKey, processor, abortSignal, logFetchLimit, startBlockheight);
|
|
255
269
|
}
|