@solana/web3.js 1.43.3 → 1.43.6

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.43.3",
3
+ "version": "1.43.6",
4
4
  "description": "Solana Javascript API",
5
5
  "keywords": [
6
6
  "api",
@@ -80,7 +80,7 @@
80
80
  "@babel/preset-env": "^7.12.11",
81
81
  "@babel/preset-typescript": "^7.12.16",
82
82
  "@babel/register": "^7.12.13",
83
- "@commitlint/config-conventional": "^15.0.0",
83
+ "@commitlint/config-conventional": "^17.0.2",
84
84
  "@commitlint/travis-cli": "^17.0.0",
85
85
  "@rollup/plugin-alias": "^3.1.9",
86
86
  "@rollup/plugin-babel": "^5.2.3",
@@ -142,6 +142,11 @@ export type TransactionCtorFields_DEPRECATED = {
142
142
  recentBlockhash?: Blockhash;
143
143
  };
144
144
 
145
+ // For backward compatibility; an unfortunate consequence of being
146
+ // forced to over-export types by the documentation generator.
147
+ // See https://github.com/solana-labs/solana/pull/25820
148
+ export type TransactionCtorFields = TransactionCtorFields_DEPRECATED;
149
+
145
150
  /**
146
151
  * List of Transaction object fields that may be initialized at construction
147
152
  */
@@ -395,13 +400,16 @@ export class Transaction {
395
400
 
396
401
  // Sort. Prioritizing first by signer, then by writable
397
402
  uniqueMetas.sort(function (x, y) {
398
- const pubkeySorting = x.pubkey
399
- .toBase58()
400
- .localeCompare(y.pubkey.toBase58());
401
- const checkSigner = x.isSigner === y.isSigner ? 0 : x.isSigner ? -1 : 1;
402
- const checkWritable =
403
- x.isWritable === y.isWritable ? pubkeySorting : x.isWritable ? -1 : 1;
404
- return checkSigner || checkWritable;
403
+ if (x.isSigner !== y.isSigner) {
404
+ // Signers always come before non-signers
405
+ return x.isSigner ? -1 : 1;
406
+ }
407
+ if (x.isWritable !== y.isWritable) {
408
+ // Writable accounts always come before read-only accounts
409
+ return x.isWritable ? -1 : 1;
410
+ }
411
+ // Otherwise, sort by pubkey, stringwise.
412
+ return x.pubkey.toBase58().localeCompare(y.pubkey.toBase58());
405
413
  });
406
414
 
407
415
  // Move fee payer to the front