@solana/web3.js 1.43.3 → 1.43.4

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.iife.js CHANGED
@@ -14277,10 +14277,18 @@ var solanaWeb3 = (function (exports) {
14277
14277
  }); // Sort. Prioritizing first by signer, then by writable
14278
14278
 
14279
14279
  uniqueMetas.sort(function (x, y) {
14280
- const pubkeySorting = x.pubkey.toBase58().localeCompare(y.pubkey.toBase58());
14281
- const checkSigner = x.isSigner === y.isSigner ? 0 : x.isSigner ? -1 : 1;
14282
- const checkWritable = x.isWritable === y.isWritable ? pubkeySorting : x.isWritable ? -1 : 1;
14283
- return checkSigner || checkWritable;
14280
+ if (x.isSigner !== y.isSigner) {
14281
+ // Signers always come before non-signers
14282
+ return x.isSigner ? -1 : 1;
14283
+ }
14284
+
14285
+ if (x.isWritable !== y.isWritable) {
14286
+ // Writable accounts always come before read-only accounts
14287
+ return x.isWritable ? -1 : 1;
14288
+ } // Otherwise, sort by pubkey.
14289
+
14290
+
14291
+ return x.pubkey._bn.cmp(y.pubkey._bn);
14284
14292
  }); // Move fee payer to the front
14285
14293
 
14286
14294
  const feePayerIndex = uniqueMetas.findIndex(x => {