@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.browser.cjs.js +12 -4
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +12 -4
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +12 -4
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +12 -4
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +12 -4
- 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 +1 -1
- package/src/transaction.ts +10 -7
package/package.json
CHANGED
package/src/transaction.ts
CHANGED
|
@@ -395,13 +395,16 @@ export class Transaction {
|
|
|
395
395
|
|
|
396
396
|
// Sort. Prioritizing first by signer, then by writable
|
|
397
397
|
uniqueMetas.sort(function (x, y) {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
.
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
398
|
+
if (x.isSigner !== y.isSigner) {
|
|
399
|
+
// Signers always come before non-signers
|
|
400
|
+
return x.isSigner ? -1 : 1;
|
|
401
|
+
}
|
|
402
|
+
if (x.isWritable !== y.isWritable) {
|
|
403
|
+
// Writable accounts always come before read-only accounts
|
|
404
|
+
return x.isWritable ? -1 : 1;
|
|
405
|
+
}
|
|
406
|
+
// Otherwise, sort by pubkey.
|
|
407
|
+
return x.pubkey._bn.cmp(y.pubkey._bn);
|
|
405
408
|
});
|
|
406
409
|
|
|
407
410
|
// Move fee payer to the front
|