@solana/web3.js 1.47.2 → 1.47.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/lib/index.browser.cjs.js +36 -18
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +36 -18
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +36 -18
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +36 -18
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +36 -18
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +2 -2
- package/lib/index.iife.min.js.map +1 -1
- package/package.json +1 -1
- package/src/connection.ts +8 -9
- package/src/transaction.ts +18 -10
package/lib/index.cjs.js
CHANGED
|
@@ -2505,15 +2505,34 @@ class Transaction {
|
|
|
2505
2505
|
|
|
2506
2506
|
if (!opts) {
|
|
2507
2507
|
return;
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
this.
|
|
2512
|
-
|
|
2508
|
+
}
|
|
2509
|
+
|
|
2510
|
+
if (opts.feePayer) {
|
|
2511
|
+
this.feePayer = opts.feePayer;
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
if (opts.signatures) {
|
|
2515
|
+
this.signatures = opts.signatures;
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
if (Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')) {
|
|
2519
|
+
const {
|
|
2520
|
+
blockhash,
|
|
2521
|
+
lastValidBlockHeight
|
|
2522
|
+
} = opts;
|
|
2523
|
+
this.recentBlockhash = blockhash;
|
|
2524
|
+
this.lastValidBlockHeight = lastValidBlockHeight;
|
|
2513
2525
|
} else {
|
|
2514
|
-
const
|
|
2515
|
-
|
|
2516
|
-
|
|
2526
|
+
const {
|
|
2527
|
+
recentBlockhash,
|
|
2528
|
+
nonceInfo
|
|
2529
|
+
} = opts;
|
|
2530
|
+
|
|
2531
|
+
if (nonceInfo) {
|
|
2532
|
+
this.nonceInfo = nonceInfo;
|
|
2533
|
+
}
|
|
2534
|
+
|
|
2535
|
+
this.recentBlockhash = recentBlockhash;
|
|
2517
2536
|
}
|
|
2518
2537
|
}
|
|
2519
2538
|
/**
|
|
@@ -6248,16 +6267,6 @@ class Connection {
|
|
|
6248
6267
|
reject(err);
|
|
6249
6268
|
}
|
|
6250
6269
|
});
|
|
6251
|
-
|
|
6252
|
-
const checkBlockHeight = async () => {
|
|
6253
|
-
try {
|
|
6254
|
-
const blockHeight = await this.getBlockHeight(commitment);
|
|
6255
|
-
return blockHeight;
|
|
6256
|
-
} catch (_e) {
|
|
6257
|
-
return -1;
|
|
6258
|
-
}
|
|
6259
|
-
};
|
|
6260
|
-
|
|
6261
6270
|
const expiryPromise = new Promise(resolve => {
|
|
6262
6271
|
if (typeof strategy === 'string') {
|
|
6263
6272
|
let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;
|
|
@@ -6281,6 +6290,15 @@ class Connection {
|
|
|
6281
6290
|
} else {
|
|
6282
6291
|
let config = strategy;
|
|
6283
6292
|
|
|
6293
|
+
const checkBlockHeight = async () => {
|
|
6294
|
+
try {
|
|
6295
|
+
const blockHeight = await this.getBlockHeight(commitment);
|
|
6296
|
+
return blockHeight;
|
|
6297
|
+
} catch (_e) {
|
|
6298
|
+
return -1;
|
|
6299
|
+
}
|
|
6300
|
+
};
|
|
6301
|
+
|
|
6284
6302
|
(async () => {
|
|
6285
6303
|
let currentBlockHeight = await checkBlockHeight();
|
|
6286
6304
|
if (done) return;
|