@atomiqlabs/chain-solana 12.0.8 → 12.0.9

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.
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SolanaEvents = void 0;
4
4
  const SolanaModule_1 = require("../SolanaModule");
5
5
  const web3_js_1 = require("@solana/web3.js");
6
+ const Utils_1 = require("../../../utils/Utils");
6
7
  class SolanaEvents extends SolanaModule_1.SolanaModule {
7
8
  constructor() {
8
9
  super(...arguments);
@@ -150,13 +151,13 @@ class SolanaEvents extends SolanaModule_1.SolanaModule {
150
151
  let filters = startBlockheight != null ? {
151
152
  slot: { gte: startBlockheight }
152
153
  } : {};
153
- const tfaResult = await this.getTransactionsForAddress(topicKey, {
154
+ const tfaResult = await (0, Utils_1.tryWithRetries)(() => this.getTransactionsForAddress(topicKey, {
154
155
  paginationToken,
155
156
  filters: {
156
157
  ...filters,
157
158
  status: "succeeded"
158
159
  }
159
- }, "confirmed");
160
+ }, "confirmed"), undefined, undefined, abortSignal);
160
161
  if (tfaResult == null) {
161
162
  //Not supported
162
163
  return undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/chain-solana",
3
- "version": "12.0.8",
3
+ "version": "12.0.9",
4
4
  "description": "Solana specific base implementation",
5
5
  "main": "./dist/index.js",
6
6
  "types:": "./dist/index.d.ts",
@@ -2,6 +2,7 @@ import {SolanaModule} from "../SolanaModule";
2
2
  import {ConfirmedSignatureInfo, ParsedTransactionWithMeta, PublicKey} from "@solana/web3.js";
3
3
  import {sign} from "tweetnacl";
4
4
  import {ProgramEvent} from "../../program/modules/SolanaProgramEvents";
5
+ import {tryWithRetries} from "../../../utils/Utils";
5
6
 
6
7
  export class SolanaEvents extends SolanaModule {
7
8
 
@@ -171,13 +172,16 @@ export class SolanaEvents extends SolanaModule {
171
172
  let filters = startBlockheight!=null ? {
172
173
  slot: {gte: startBlockheight}
173
174
  } : {};
174
- const tfaResult = await this.getTransactionsForAddress(topicKey, {
175
- paginationToken,
176
- filters: {
177
- ...filters,
178
- status: "succeeded"
179
- }
180
- }, "confirmed");
175
+ const tfaResult = await tryWithRetries(
176
+ () => this.getTransactionsForAddress(topicKey, {
177
+ paginationToken,
178
+ filters: {
179
+ ...filters,
180
+ status: "succeeded"
181
+ }
182
+ }, "confirmed"),
183
+ undefined, undefined, abortSignal
184
+ );
181
185
 
182
186
  if(tfaResult==null) {
183
187
  //Not supported