@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.esm.js CHANGED
@@ -6721,7 +6721,14 @@ class Connection {
6721
6721
  let transaction;
6722
6722
 
6723
6723
  if (transactionOrMessage instanceof Transaction) {
6724
- transaction = transactionOrMessage;
6724
+ let originalTx = transactionOrMessage;
6725
+ transaction = new Transaction({
6726
+ recentBlockhash: originalTx.recentBlockhash,
6727
+ nonceInfo: originalTx.nonceInfo,
6728
+ feePayer: originalTx.feePayer,
6729
+ signatures: [...originalTx.signatures]
6730
+ });
6731
+ transaction.instructions = transactionOrMessage.instructions;
6725
6732
  } else {
6726
6733
  transaction = Transaction.populate(transactionOrMessage);
6727
6734
  }
@@ -6889,12 +6896,6 @@ class Connection {
6889
6896
 
6890
6897
  if ('data' in res.error) {
6891
6898
  logs = res.error.data.logs;
6892
-
6893
- if (logs && Array.isArray(logs)) {
6894
- const traceIndent = '\n ';
6895
- const logTrace = traceIndent + logs.join(traceIndent);
6896
- console.error(res.error.message, logTrace);
6897
- }
6898
6899
  }
6899
6900
 
6900
6901
  throw new SendTransactionError('failed to send transaction: ' + res.error.message, logs);
@@ -7000,6 +7001,7 @@ class Connection {
7000
7001
 
7001
7002
  _resetSubscriptions() {
7002
7003
  Object.values(this._accountChangeSubscriptions).forEach(s => s.subscriptionId = null);
7004
+ Object.values(this._logsSubscriptions).forEach(s => s.subscriptionId = null);
7003
7005
  Object.values(this._programAccountChangeSubscriptions).forEach(s => s.subscriptionId = null);
7004
7006
  Object.values(this._rootSubscriptions).forEach(s => s.subscriptionId = null);
7005
7007
  Object.values(this._signatureSubscriptions).forEach(s => s.subscriptionId = null);