@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.esm.js
CHANGED
|
@@ -2592,13 +2592,6 @@ class Transaction {
|
|
|
2592
2592
|
isSigner: false,
|
|
2593
2593
|
isWritable: false
|
|
2594
2594
|
});
|
|
2595
|
-
}); // Sort. Prioritizing first by signer, then by writable
|
|
2596
|
-
|
|
2597
|
-
accountMetas.sort(function (x, y) {
|
|
2598
|
-
const pubkeySorting = x.pubkey.toBase58().localeCompare(y.pubkey.toBase58());
|
|
2599
|
-
const checkSigner = x.isSigner === y.isSigner ? 0 : x.isSigner ? -1 : 1;
|
|
2600
|
-
const checkWritable = x.isWritable === y.isWritable ? pubkeySorting : x.isWritable ? -1 : 1;
|
|
2601
|
-
return checkSigner || checkWritable;
|
|
2602
2595
|
}); // Cull duplicate account metas
|
|
2603
2596
|
|
|
2604
2597
|
const uniqueMetas = [];
|
|
@@ -2610,9 +2603,17 @@ class Transaction {
|
|
|
2610
2603
|
|
|
2611
2604
|
if (uniqueIndex > -1) {
|
|
2612
2605
|
uniqueMetas[uniqueIndex].isWritable = uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;
|
|
2606
|
+
uniqueMetas[uniqueIndex].isSigner = uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;
|
|
2613
2607
|
} else {
|
|
2614
2608
|
uniqueMetas.push(accountMeta);
|
|
2615
2609
|
}
|
|
2610
|
+
}); // Sort. Prioritizing first by signer, then by writable
|
|
2611
|
+
|
|
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;
|
|
2616
2617
|
}); // Move fee payer to the front
|
|
2617
2618
|
|
|
2618
2619
|
const feePayerIndex = uniqueMetas.findIndex(x => {
|