@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana/web3.js",
3
- "version": "1.37.0",
3
+ "version": "1.38.0",
4
4
  "description": "Solana Javascript API",
5
5
  "keywords": [
6
6
  "api",
@@ -33,18 +33,15 @@
33
33
  ],
34
34
  "files": [
35
35
  "/lib",
36
- "/module.flow.js",
37
36
  "/src"
38
37
  ],
39
38
  "scripts": {
40
- "build": "npm run clean; cross-env NODE_ENV=production rollup -c; npm run type:gen; npm run flow:gen; npm run flow:check",
39
+ "build": "npm run clean; cross-env NODE_ENV=production rollup -c; npm run type:gen",
41
40
  "build:fixtures": "set -ex; ./test/fixtures/noop-program/build.sh",
42
41
  "clean": "rimraf ./coverage ./lib",
43
42
  "codecov": "set -ex; npm run test:cover; cat ./coverage/lcov.info | codecov",
44
43
  "dev": "cross-env NODE_ENV=development rollup -c",
45
44
  "doc": "set -ex; typedoc --treatWarningsAsErrors",
46
- "flow:check": "flow check-contents < module.flow.js",
47
- "flow:gen": "flowgen lib/index.d.ts -o module.flow.js",
48
45
  "type:gen": "./scripts/typegen.sh",
49
46
  "lint": "set -ex; npm run pretty; eslint . --ext .js,.ts",
50
47
  "lint:fix": "npm run pretty:fix && eslint . --fix --ext .js,.ts",
@@ -113,8 +110,6 @@
113
110
  "eslint-plugin-mocha": "^9.0.0",
114
111
  "eslint-plugin-prettier": "^4.0.0",
115
112
  "esm": "^3.2.25",
116
- "flow-bin": "^0.150.0",
117
- "flowgen": "^1.13.0",
118
113
  "http-server": "^14.0.0",
119
114
  "mocha": "^8.2.1",
120
115
  "mockttp": "^2.0.1",
package/src/connection.ts CHANGED
@@ -3878,7 +3878,14 @@ export class Connection {
3878
3878
  ): Promise<RpcResponseAndContext<SimulatedTransactionResponse>> {
3879
3879
  let transaction;
3880
3880
  if (transactionOrMessage instanceof Transaction) {
3881
- transaction = transactionOrMessage;
3881
+ let originalTx: Transaction = transactionOrMessage;
3882
+ transaction = new Transaction({
3883
+ recentBlockhash: originalTx.recentBlockhash,
3884
+ nonceInfo: originalTx.nonceInfo,
3885
+ feePayer: originalTx.feePayer,
3886
+ signatures: [...originalTx.signatures],
3887
+ });
3888
+ transaction.instructions = transactionOrMessage.instructions;
3882
3889
  } else {
3883
3890
  transaction = Transaction.populate(transactionOrMessage);
3884
3891
  }
@@ -4048,11 +4055,6 @@ export class Connection {
4048
4055
  let logs;
4049
4056
  if ('data' in res.error) {
4050
4057
  logs = res.error.data.logs;
4051
- if (logs && Array.isArray(logs)) {
4052
- const traceIndent = '\n ';
4053
- const logTrace = traceIndent + logs.join(traceIndent);
4054
- console.error(res.error.message, logTrace);
4055
- }
4056
4058
  }
4057
4059
  throw new SendTransactionError(
4058
4060
  'failed to send transaction: ' + res.error.message,
@@ -4159,6 +4161,9 @@ export class Connection {
4159
4161
  Object.values(this._accountChangeSubscriptions).forEach(
4160
4162
  s => (s.subscriptionId = null),
4161
4163
  );
4164
+ Object.values(this._logsSubscriptions).forEach(
4165
+ s => (s.subscriptionId = null),
4166
+ );
4162
4167
  Object.values(this._programAccountChangeSubscriptions).forEach(
4163
4168
  s => (s.subscriptionId = null),
4164
4169
  );