@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 +4 -3
- package/lib/index.browser.cjs.js +9 -7
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +9 -7
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +9 -7
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +9 -7
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +9 -7
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +1 -1
- package/lib/index.iife.min.js.map +1 -1
- package/package.json +2 -7
- package/src/connection.ts +11 -6
- package/module.flow.js +0 -4412
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
|
-
|
|
100
|
-
https://
|
|
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
|
|
package/lib/index.browser.cjs.js
CHANGED
|
@@ -7250,7 +7250,14 @@ class Connection {
|
|
|
7250
7250
|
let transaction;
|
|
7251
7251
|
|
|
7252
7252
|
if (transactionOrMessage instanceof Transaction) {
|
|
7253
|
-
|
|
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);
|