@solana/web3.js 1.43.2 → 1.43.3
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 +8 -7
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +8 -7
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +8 -7
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +8 -7
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +8 -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 +1 -1
- package/src/transaction.ts +13 -11
package/lib/index.browser.cjs.js
CHANGED
|
@@ -2599,13 +2599,6 @@ class Transaction {
|
|
|
2599
2599
|
isSigner: false,
|
|
2600
2600
|
isWritable: false
|
|
2601
2601
|
});
|
|
2602
|
-
}); // Sort. Prioritizing first by signer, then by writable
|
|
2603
|
-
|
|
2604
|
-
accountMetas.sort(function (x, y) {
|
|
2605
|
-
const pubkeySorting = x.pubkey.toBase58().localeCompare(y.pubkey.toBase58());
|
|
2606
|
-
const checkSigner = x.isSigner === y.isSigner ? 0 : x.isSigner ? -1 : 1;
|
|
2607
|
-
const checkWritable = x.isWritable === y.isWritable ? pubkeySorting : x.isWritable ? -1 : 1;
|
|
2608
|
-
return checkSigner || checkWritable;
|
|
2609
2602
|
}); // Cull duplicate account metas
|
|
2610
2603
|
|
|
2611
2604
|
const uniqueMetas = [];
|
|
@@ -2617,9 +2610,17 @@ class Transaction {
|
|
|
2617
2610
|
|
|
2618
2611
|
if (uniqueIndex > -1) {
|
|
2619
2612
|
uniqueMetas[uniqueIndex].isWritable = uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;
|
|
2613
|
+
uniqueMetas[uniqueIndex].isSigner = uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;
|
|
2620
2614
|
} else {
|
|
2621
2615
|
uniqueMetas.push(accountMeta);
|
|
2622
2616
|
}
|
|
2617
|
+
}); // Sort. Prioritizing first by signer, then by writable
|
|
2618
|
+
|
|
2619
|
+
uniqueMetas.sort(function (x, y) {
|
|
2620
|
+
const pubkeySorting = x.pubkey.toBase58().localeCompare(y.pubkey.toBase58());
|
|
2621
|
+
const checkSigner = x.isSigner === y.isSigner ? 0 : x.isSigner ? -1 : 1;
|
|
2622
|
+
const checkWritable = x.isWritable === y.isWritable ? pubkeySorting : x.isWritable ? -1 : 1;
|
|
2623
|
+
return checkSigner || checkWritable;
|
|
2623
2624
|
}); // Move fee payer to the front
|
|
2624
2625
|
|
|
2625
2626
|
const feePayerIndex = uniqueMetas.findIndex(x => {
|