@solana/web3.js 1.37.0 → 1.38.0

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.cjs.js CHANGED
@@ -6756,7 +6756,14 @@ class Connection {
6756
6756
  let transaction;
6757
6757
 
6758
6758
  if (transactionOrMessage instanceof Transaction) {
6759
- transaction = transactionOrMessage;
6759
+ let originalTx = transactionOrMessage;
6760
+ transaction = new Transaction({
6761
+ recentBlockhash: originalTx.recentBlockhash,
6762
+ nonceInfo: originalTx.nonceInfo,
6763
+ feePayer: originalTx.feePayer,
6764
+ signatures: [...originalTx.signatures]
6765
+ });
6766
+ transaction.instructions = transactionOrMessage.instructions;
6760
6767
  } else {
6761
6768
  transaction = Transaction.populate(transactionOrMessage);
6762
6769
  }
@@ -6924,12 +6931,6 @@ class Connection {
6924
6931
 
6925
6932
  if ('data' in res.error) {
6926
6933
  logs = res.error.data.logs;
6927
-
6928
- if (logs && Array.isArray(logs)) {
6929
- const traceIndent = '\n ';
6930
- const logTrace = traceIndent + logs.join(traceIndent);
6931
- console.error(res.error.message, logTrace);
6932
- }
6933
6934
  }
6934
6935
 
6935
6936
  throw new SendTransactionError('failed to send transaction: ' + res.error.message, logs);
@@ -7035,6 +7036,7 @@ class Connection {
7035
7036
 
7036
7037
  _resetSubscriptions() {
7037
7038
  Object.values(this._accountChangeSubscriptions).forEach(s => s.subscriptionId = null);
7039
+ Object.values(this._logsSubscriptions).forEach(s => s.subscriptionId = null);
7038
7040
  Object.values(this._programAccountChangeSubscriptions).forEach(s => s.subscriptionId = null);
7039
7041
  Object.values(this._rootSubscriptions).forEach(s => s.subscriptionId = null);
7040
7042
  Object.values(this._signatureSubscriptions).forEach(s => s.subscriptionId = null);