@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.esm.js
CHANGED
|
@@ -2447,15 +2447,34 @@ class Transaction {
|
|
|
2447
2447
|
|
|
2448
2448
|
if (!opts) {
|
|
2449
2449
|
return;
|
|
2450
|
-
}
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
this.
|
|
2454
|
-
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2452
|
+
if (opts.feePayer) {
|
|
2453
|
+
this.feePayer = opts.feePayer;
|
|
2454
|
+
}
|
|
2455
|
+
|
|
2456
|
+
if (opts.signatures) {
|
|
2457
|
+
this.signatures = opts.signatures;
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
if (Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')) {
|
|
2461
|
+
const {
|
|
2462
|
+
blockhash,
|
|
2463
|
+
lastValidBlockHeight
|
|
2464
|
+
} = opts;
|
|
2465
|
+
this.recentBlockhash = blockhash;
|
|
2466
|
+
this.lastValidBlockHeight = lastValidBlockHeight;
|
|
2455
2467
|
} else {
|
|
2456
|
-
const
|
|
2457
|
-
|
|
2458
|
-
|
|
2468
|
+
const {
|
|
2469
|
+
recentBlockhash,
|
|
2470
|
+
nonceInfo
|
|
2471
|
+
} = opts;
|
|
2472
|
+
|
|
2473
|
+
if (nonceInfo) {
|
|
2474
|
+
this.nonceInfo = nonceInfo;
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
this.recentBlockhash = recentBlockhash;
|
|
2459
2478
|
}
|
|
2460
2479
|
}
|
|
2461
2480
|
/**
|
|
@@ -6132,16 +6151,6 @@ class Connection {
|
|
|
6132
6151
|
reject(err);
|
|
6133
6152
|
}
|
|
6134
6153
|
});
|
|
6135
|
-
|
|
6136
|
-
const checkBlockHeight = async () => {
|
|
6137
|
-
try {
|
|
6138
|
-
const blockHeight = await this.getBlockHeight(commitment);
|
|
6139
|
-
return blockHeight;
|
|
6140
|
-
} catch (_e) {
|
|
6141
|
-
return -1;
|
|
6142
|
-
}
|
|
6143
|
-
};
|
|
6144
|
-
|
|
6145
6154
|
const expiryPromise = new Promise(resolve => {
|
|
6146
6155
|
if (typeof strategy === 'string') {
|
|
6147
6156
|
let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;
|
|
@@ -6165,6 +6174,15 @@ class Connection {
|
|
|
6165
6174
|
} else {
|
|
6166
6175
|
let config = strategy;
|
|
6167
6176
|
|
|
6177
|
+
const checkBlockHeight = async () => {
|
|
6178
|
+
try {
|
|
6179
|
+
const blockHeight = await this.getBlockHeight(commitment);
|
|
6180
|
+
return blockHeight;
|
|
6181
|
+
} catch (_e) {
|
|
6182
|
+
return -1;
|
|
6183
|
+
}
|
|
6184
|
+
};
|
|
6185
|
+
|
|
6168
6186
|
(async () => {
|
|
6169
6187
|
let currentBlockHeight = await checkBlockHeight();
|
|
6170
6188
|
if (done) return;
|