@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.browser.cjs.js
CHANGED
|
@@ -2478,15 +2478,34 @@ class Transaction {
|
|
|
2478
2478
|
|
|
2479
2479
|
if (!opts) {
|
|
2480
2480
|
return;
|
|
2481
|
-
}
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
this.
|
|
2485
|
-
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
if (opts.feePayer) {
|
|
2484
|
+
this.feePayer = opts.feePayer;
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
if (opts.signatures) {
|
|
2488
|
+
this.signatures = opts.signatures;
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
if (Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')) {
|
|
2492
|
+
const {
|
|
2493
|
+
blockhash,
|
|
2494
|
+
lastValidBlockHeight
|
|
2495
|
+
} = opts;
|
|
2496
|
+
this.recentBlockhash = blockhash;
|
|
2497
|
+
this.lastValidBlockHeight = lastValidBlockHeight;
|
|
2486
2498
|
} else {
|
|
2487
|
-
const
|
|
2488
|
-
|
|
2489
|
-
|
|
2499
|
+
const {
|
|
2500
|
+
recentBlockhash,
|
|
2501
|
+
nonceInfo
|
|
2502
|
+
} = opts;
|
|
2503
|
+
|
|
2504
|
+
if (nonceInfo) {
|
|
2505
|
+
this.nonceInfo = nonceInfo;
|
|
2506
|
+
}
|
|
2507
|
+
|
|
2508
|
+
this.recentBlockhash = recentBlockhash;
|
|
2490
2509
|
}
|
|
2491
2510
|
}
|
|
2492
2511
|
/**
|
|
@@ -6163,16 +6182,6 @@ class Connection {
|
|
|
6163
6182
|
reject(err);
|
|
6164
6183
|
}
|
|
6165
6184
|
});
|
|
6166
|
-
|
|
6167
|
-
const checkBlockHeight = async () => {
|
|
6168
|
-
try {
|
|
6169
|
-
const blockHeight = await this.getBlockHeight(commitment);
|
|
6170
|
-
return blockHeight;
|
|
6171
|
-
} catch (_e) {
|
|
6172
|
-
return -1;
|
|
6173
|
-
}
|
|
6174
|
-
};
|
|
6175
|
-
|
|
6176
6185
|
const expiryPromise = new Promise(resolve => {
|
|
6177
6186
|
if (typeof strategy === 'string') {
|
|
6178
6187
|
let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;
|
|
@@ -6196,6 +6205,15 @@ class Connection {
|
|
|
6196
6205
|
} else {
|
|
6197
6206
|
let config = strategy;
|
|
6198
6207
|
|
|
6208
|
+
const checkBlockHeight = async () => {
|
|
6209
|
+
try {
|
|
6210
|
+
const blockHeight = await this.getBlockHeight(commitment);
|
|
6211
|
+
return blockHeight;
|
|
6212
|
+
} catch (_e) {
|
|
6213
|
+
return -1;
|
|
6214
|
+
}
|
|
6215
|
+
};
|
|
6216
|
+
|
|
6199
6217
|
(async () => {
|
|
6200
6218
|
let currentBlockHeight = await checkBlockHeight();
|
|
6201
6219
|
if (done) return;
|