@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/README.md CHANGED
@@ -94,10 +94,11 @@ Example scripts for the Solana Program Library:
94
94
 
95
95
  - [Token Program Examples](https://github.com/solana-labs/solana-program-library/tree/master/token/js/examples)
96
96
 
97
- ## Flow
97
+ ## Flow Support (Discontinued)
98
98
 
99
- A [Flow library definition](https://flow.org/en/docs/libdefs/) is provided at
100
- https://unpkg.com/@solana/web3.js@latest/module.flow.js.
99
+ Flow types are no longer supported in new releases. The last release with Flow support is v1.37.2 and its
100
+ [Flow library definition](https://flow.org/en/docs/libdefs/) is provided at
101
+ https://unpkg.com/@solana/web3.js@v1.37.2/module.flow.js.
101
102
  Download the file and add the following line under the [libs] section of your project's `.flowconfig` to
102
103
  activate it:
103
104
 
@@ -7250,7 +7250,14 @@ class Connection {
7250
7250
  let transaction;
7251
7251
 
7252
7252
  if (transactionOrMessage instanceof Transaction) {
7253
- transaction = transactionOrMessage;
7253
+ let originalTx = transactionOrMessage;
7254
+ transaction = new Transaction({
7255
+ recentBlockhash: originalTx.recentBlockhash,
7256
+ nonceInfo: originalTx.nonceInfo,
7257
+ feePayer: originalTx.feePayer,
7258
+ signatures: [...originalTx.signatures]
7259
+ });
7260
+ transaction.instructions = transactionOrMessage.instructions;
7254
7261
  } else {
7255
7262
  transaction = Transaction.populate(transactionOrMessage);
7256
7263
  }
@@ -7418,12 +7425,6 @@ class Connection {
7418
7425
 
7419
7426
  if ('data' in res.error) {
7420
7427
  logs = res.error.data.logs;
7421
-
7422
- if (logs && Array.isArray(logs)) {
7423
- const traceIndent = '\n ';
7424
- const logTrace = traceIndent + logs.join(traceIndent);
7425
- console.error(res.error.message, logTrace);
7426
- }
7427
7428
  }
7428
7429
 
7429
7430
  throw new SendTransactionError('failed to send transaction: ' + res.error.message, logs);
@@ -7529,6 +7530,7 @@ class Connection {
7529
7530
 
7530
7531
  _resetSubscriptions() {
7531
7532
  Object.values(this._accountChangeSubscriptions).forEach(s => s.subscriptionId = null);
7533
+ Object.values(this._logsSubscriptions).forEach(s => s.subscriptionId = null);
7532
7534
  Object.values(this._programAccountChangeSubscriptions).forEach(s => s.subscriptionId = null);
7533
7535
  Object.values(this._rootSubscriptions).forEach(s => s.subscriptionId = null);
7534
7536
  Object.values(this._signatureSubscriptions).forEach(s => s.subscriptionId = null);