@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/lib/index.d.ts CHANGED
@@ -415,6 +415,7 @@ declare module '@solana/web3.js' {
415
415
  /** A recent blockhash */
416
416
  recentBlockhash?: Blockhash;
417
417
  };
418
+ export type TransactionCtorFields = TransactionCtorFields_DEPRECATED;
418
419
  /**
419
420
  * List of Transaction object fields that may be initialized at construction
420
421
  */
package/lib/index.esm.js CHANGED
@@ -2610,10 +2610,18 @@ class Transaction {
2610
2610
  }); // Sort. Prioritizing first by signer, then by writable
2611
2611
 
2612
2612
  uniqueMetas.sort(function (x, y) {
2613
- const pubkeySorting = x.pubkey.toBase58().localeCompare(y.pubkey.toBase58());
2614
- const checkSigner = x.isSigner === y.isSigner ? 0 : x.isSigner ? -1 : 1;
2615
- const checkWritable = x.isWritable === y.isWritable ? pubkeySorting : x.isWritable ? -1 : 1;
2616
- return checkSigner || checkWritable;
2613
+ if (x.isSigner !== y.isSigner) {
2614
+ // Signers always come before non-signers
2615
+ return x.isSigner ? -1 : 1;
2616
+ }
2617
+
2618
+ if (x.isWritable !== y.isWritable) {
2619
+ // Writable accounts always come before read-only accounts
2620
+ return x.isWritable ? -1 : 1;
2621
+ } // Otherwise, sort by pubkey, stringwise.
2622
+
2623
+
2624
+ return x.pubkey.toBase58().localeCompare(y.pubkey.toBase58());
2617
2625
  }); // Move fee payer to the front
2618
2626
 
2619
2627
  const feePayerIndex = uniqueMetas.findIndex(x => {