@debridge-finance/solana-utils 4.4.0 → 4.4.1
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/dist/browser/index.js
CHANGED
|
@@ -6685,11 +6685,11 @@ function sendAll(connection, wallet, transactions, options) {
|
|
|
6685
6685
|
if (!skipPreflight) {
|
|
6686
6686
|
yield Promise.all(transactions.map((tx) => simulateTx(connection, tx, blockhashCommitment, wallet.publicKey, convertIntoTxV0, skipSign)));
|
|
6687
6687
|
}
|
|
6688
|
-
const
|
|
6688
|
+
const blockhashResponse = yield connection.getLatestBlockhashAndContext({ commitment: blockhashCommitment });
|
|
6689
6689
|
let signed = transactions;
|
|
6690
6690
|
if (!skipSign) {
|
|
6691
6691
|
// set real blockhash
|
|
6692
|
-
transactions.map((tx) => setBlockhash(tx, blockhash));
|
|
6692
|
+
transactions.map((tx) => setBlockhash(tx, blockhashResponse.value.blockhash));
|
|
6693
6693
|
// sign after setting correct blockhashes
|
|
6694
6694
|
signed = yield wallet.signAllTransactions(transactions, options === null || options === void 0 ? void 0 : options.signers);
|
|
6695
6695
|
}
|
|
@@ -6700,6 +6700,7 @@ function sendAll(connection, wallet, transactions, options) {
|
|
|
6700
6700
|
return connection.sendEncodedTransaction(serialized, {
|
|
6701
6701
|
preflightCommitment: blockhashCommitment,
|
|
6702
6702
|
skipPreflight: false,
|
|
6703
|
+
minContextSlot: blockhashResponse.context.slot + 1
|
|
6703
6704
|
});
|
|
6704
6705
|
}));
|
|
6705
6706
|
}
|