@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/package.json
CHANGED
package/src/connection.ts
CHANGED
|
@@ -3051,15 +3051,6 @@ export class Connection {
|
|
|
3051
3051
|
}
|
|
3052
3052
|
});
|
|
3053
3053
|
|
|
3054
|
-
const checkBlockHeight = async () => {
|
|
3055
|
-
try {
|
|
3056
|
-
const blockHeight = await this.getBlockHeight(commitment);
|
|
3057
|
-
return blockHeight;
|
|
3058
|
-
} catch (_e) {
|
|
3059
|
-
return -1;
|
|
3060
|
-
}
|
|
3061
|
-
};
|
|
3062
|
-
|
|
3063
3054
|
const expiryPromise = new Promise<
|
|
3064
3055
|
| {__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED}
|
|
3065
3056
|
| {__type: TransactionStatus.TIMED_OUT; timeoutMs: number}
|
|
@@ -3088,6 +3079,14 @@ export class Connection {
|
|
|
3088
3079
|
} else {
|
|
3089
3080
|
let config =
|
|
3090
3081
|
strategy as BlockheightBasedTransactionConfirmationStrategy;
|
|
3082
|
+
const checkBlockHeight = async () => {
|
|
3083
|
+
try {
|
|
3084
|
+
const blockHeight = await this.getBlockHeight(commitment);
|
|
3085
|
+
return blockHeight;
|
|
3086
|
+
} catch (_e) {
|
|
3087
|
+
return -1;
|
|
3088
|
+
}
|
|
3089
|
+
};
|
|
3091
3090
|
(async () => {
|
|
3092
3091
|
let currentBlockHeight = await checkBlockHeight();
|
|
3093
3092
|
if (done) return;
|
package/src/transaction.ts
CHANGED
|
@@ -258,17 +258,25 @@ export class Transaction {
|
|
|
258
258
|
) {
|
|
259
259
|
if (!opts) {
|
|
260
260
|
return;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
this.
|
|
267
|
-
|
|
261
|
+
}
|
|
262
|
+
if (opts.feePayer) {
|
|
263
|
+
this.feePayer = opts.feePayer;
|
|
264
|
+
}
|
|
265
|
+
if (opts.signatures) {
|
|
266
|
+
this.signatures = opts.signatures;
|
|
267
|
+
}
|
|
268
|
+
if (Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')) {
|
|
269
|
+
const {blockhash, lastValidBlockHeight} =
|
|
270
|
+
opts as TransactionBlockhashCtor;
|
|
271
|
+
this.recentBlockhash = blockhash;
|
|
272
|
+
this.lastValidBlockHeight = lastValidBlockHeight;
|
|
268
273
|
} else {
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
|
|
274
|
+
const {recentBlockhash, nonceInfo} =
|
|
275
|
+
opts as TransactionCtorFields_DEPRECATED;
|
|
276
|
+
if (nonceInfo) {
|
|
277
|
+
this.nonceInfo = nonceInfo;
|
|
278
|
+
}
|
|
279
|
+
this.recentBlockhash = recentBlockhash;
|
|
272
280
|
}
|
|
273
281
|
}
|
|
274
282
|
|