@solana/web3.js 1.43.2 → 1.43.5
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 +16 -7
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +16 -7
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +16 -7
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +16 -7
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +16 -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 +2 -2
- package/src/transaction.ts +16 -11
package/lib/index.iife.js
CHANGED
|
@@ -14259,13 +14259,6 @@ var solanaWeb3 = (function (exports) {
|
|
|
14259
14259
|
isSigner: false,
|
|
14260
14260
|
isWritable: false
|
|
14261
14261
|
});
|
|
14262
|
-
}); // Sort. Prioritizing first by signer, then by writable
|
|
14263
|
-
|
|
14264
|
-
accountMetas.sort(function (x, y) {
|
|
14265
|
-
const pubkeySorting = x.pubkey.toBase58().localeCompare(y.pubkey.toBase58());
|
|
14266
|
-
const checkSigner = x.isSigner === y.isSigner ? 0 : x.isSigner ? -1 : 1;
|
|
14267
|
-
const checkWritable = x.isWritable === y.isWritable ? pubkeySorting : x.isWritable ? -1 : 1;
|
|
14268
|
-
return checkSigner || checkWritable;
|
|
14269
14262
|
}); // Cull duplicate account metas
|
|
14270
14263
|
|
|
14271
14264
|
const uniqueMetas = [];
|
|
@@ -14277,9 +14270,25 @@ var solanaWeb3 = (function (exports) {
|
|
|
14277
14270
|
|
|
14278
14271
|
if (uniqueIndex > -1) {
|
|
14279
14272
|
uniqueMetas[uniqueIndex].isWritable = uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;
|
|
14273
|
+
uniqueMetas[uniqueIndex].isSigner = uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;
|
|
14280
14274
|
} else {
|
|
14281
14275
|
uniqueMetas.push(accountMeta);
|
|
14282
14276
|
}
|
|
14277
|
+
}); // Sort. Prioritizing first by signer, then by writable
|
|
14278
|
+
|
|
14279
|
+
uniqueMetas.sort(function (x, y) {
|
|
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, stringwise.
|
|
14289
|
+
|
|
14290
|
+
|
|
14291
|
+
return x.pubkey.toBase58().localeCompare(y.pubkey.toBase58());
|
|
14283
14292
|
}); // Move fee payer to the front
|
|
14284
14293
|
|
|
14285
14294
|
const feePayerIndex = uniqueMetas.findIndex(x => {
|