@debridge-finance/solana-utils 4.3.0 → 4.3.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.
@@ -6669,6 +6669,7 @@ function simulateTx(connection, tx, commitment, feePayer, convertToV0, alreadySi
6669
6669
  });
6670
6670
  }
6671
6671
  else {
6672
+ txCopy.recentBlockhash = FAKE_BLOCKHASH;
6672
6673
  result = yield connection.simulateTransaction(txCopy.compileMessage());
6673
6674
  }
6674
6675
  if (result.value.err !== null) {
@@ -6705,12 +6706,13 @@ function sendAll(connection, wallet, transactions, options) {
6705
6706
  yield Promise.all(transactions.map((tx) => simulateTx(connection, tx, blockhashCommitment, wallet.publicKey, convertIntoTxV0, skipSign)));
6706
6707
  }
6707
6708
  const { blockhash, lastValidBlockHeight } = yield connection.getLatestBlockhash({ commitment: blockhashCommitment });
6709
+ let signed = transactions;
6708
6710
  if (!skipSign) {
6709
6711
  // set real blockhash
6710
6712
  transactions.map((tx) => setBlockhash(tx, blockhash));
6713
+ // sign after setting correct blockhashes
6714
+ signed = yield wallet.signAllTransactions(transactions, options === null || options === void 0 ? void 0 : options.signers);
6711
6715
  }
6712
- // sign after setting correct blockhashes
6713
- const signed = yield wallet.signAllTransactions(transactions, options === null || options === void 0 ? void 0 : options.signers);
6714
6716
  txIds = yield Promise.all(signed.map((signedTx) => {
6715
6717
  var _a;
6716
6718
  const serialized = buffer.Buffer.from(signedTx.serialize());