@clonegod/ttd-sol-common 1.0.131 → 1.0.133

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,32 +591,6 @@ class RpcClient {
591
591
  bundleId
592
592
  });
593
593
  this.try_get_bundle_failed_result(txid, bundleId);
594
- const currentBlockHeight = yield solana_trade_runtime.connection.getBlockHeight();
595
- const lastValidBlockHeight = Math.min(blockhash.lastValidBlockHeight, currentBlockHeight + lastValidBlockHeightOffset);
596
- const timeout = 10000;
597
- const interval = 2000;
598
- const startTime = Date.now();
599
- while (Date.now() - startTime < timeout) {
600
- const bundleStatuses = yield this.getBundleStatuses([bundleId], jitoApiUrl);
601
- (0, dist_1.log_debug)(`getBundleStatuses success`, {
602
- txid,
603
- bundleId,
604
- jitoApiUrl,
605
- bundleStatuses
606
- });
607
- if (bundleStatuses &&
608
- bundleStatuses.value &&
609
- bundleStatuses.value.length > 0 &&
610
- bundleStatuses.value[0]) {
611
- const status = bundleStatuses.value[0].confirmation_status;
612
- if (status === 'confirmed') {
613
- return bundleStatuses.value[0].transactions[0];
614
- }
615
- }
616
- yield new Promise((resolve) => setTimeout(resolve, interval));
617
- }
618
- let err = new Error('Bundle failed to confirm within the timeout period:' + timeout + 'ms');
619
- (0, dist_1.log_error)(`Bundle failed to confirm, txid=${txid}`, err);
620
594
  }), 0);
621
595
  return txid;
622
596
  });
@@ -715,33 +689,6 @@ class RpcClient {
715
689
  txid,
716
690
  bundleId
717
691
  });
718
- const currentBlockHeight = yield solana_trade_runtime.connection.getBlockHeight();
719
- const lastValidBlockHeight = Math.min(blockhash.lastValidBlockHeight, currentBlockHeight + lastValidBlockHeightOffset);
720
- const timeout = 70000;
721
- const interval = 10000;
722
- const startTime = Date.now();
723
- while (Date.now() - startTime < timeout ||
724
- (yield this.connection.getBlockHeight()) <= lastValidBlockHeight) {
725
- yield new Promise((resolve) => setTimeout(resolve, interval));
726
- const bundleStatuses = yield this.getBundleStatuses([bundleId], jitoApiUrl);
727
- (0, dist_1.log_info)(`getBundleStatuses`, {
728
- txid,
729
- bundleId,
730
- jitoApiUrl,
731
- bundleStatuses
732
- });
733
- if (bundleStatuses &&
734
- bundleStatuses.value &&
735
- bundleStatuses.value.length > 0 &&
736
- bundleStatuses.value[0]) {
737
- const status = bundleStatuses.value[0].confirmation_status;
738
- if (status === 'confirmed') {
739
- return bundleStatuses.value[0].transactions[0];
740
- }
741
- }
742
- }
743
- let err = new Error('Bundle failed to confirm within the timeout period:' + timeout + 'ms');
744
- (0, dist_1.log_error)(`Bundle failed to confirm, txid=${txid}`, err);
745
692
  }), 0);
746
693
  return txid;
747
694
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-sol-common",
3
- "version": "1.0.131",
3
+ "version": "1.0.133",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",