@drift-labs/sdk 2.43.0-beta.14 → 2.43.0-beta.15
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 +1 -1
- package/lib/tx/fastSingleTxSender.js +6 -1
- package/package.json +1 -1
- package/src/tx/fastSingleTxSender.ts +7 -3
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.43.0-beta.
|
|
1
|
+
2.43.0-beta.15
|
|
@@ -20,7 +20,12 @@ class FastSingleTxSender extends baseTxSender_1.BaseTxSender {
|
|
|
20
20
|
}
|
|
21
21
|
startBlockhashRefreshLoop() {
|
|
22
22
|
setInterval(async () => {
|
|
23
|
-
|
|
23
|
+
try {
|
|
24
|
+
this.recentBlockhash = (await this.connection.getLatestBlockhash(this.opts)).blockhash;
|
|
25
|
+
}
|
|
26
|
+
catch (e) {
|
|
27
|
+
console.error('Error in startBlockhashRefreshLoop: ', e);
|
|
28
|
+
}
|
|
24
29
|
}, this.blockhashRefreshInterval);
|
|
25
30
|
}
|
|
26
31
|
async prepareTx(tx, additionalSigners, opts) {
|
package/package.json
CHANGED
|
@@ -54,9 +54,13 @@ export class FastSingleTxSender extends BaseTxSender {
|
|
|
54
54
|
|
|
55
55
|
startBlockhashRefreshLoop(): void {
|
|
56
56
|
setInterval(async () => {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
try {
|
|
58
|
+
this.recentBlockhash = (
|
|
59
|
+
await this.connection.getLatestBlockhash(this.opts)
|
|
60
|
+
).blockhash;
|
|
61
|
+
} catch (e) {
|
|
62
|
+
console.error('Error in startBlockhashRefreshLoop: ', e);
|
|
63
|
+
}
|
|
60
64
|
}, this.blockhashRefreshInterval);
|
|
61
65
|
}
|
|
62
66
|
|