@exodus/solana-lib 1.3.12 → 1.3.14
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/package.json +3 -2
- package/src/vendor/transaction.js +13 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/solana-lib",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.14",
|
|
4
4
|
"description": "Exodus internal Solana low-level library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -28,5 +28,6 @@
|
|
|
28
28
|
"create-hash": "^1.1.3",
|
|
29
29
|
"lodash": "^4.17.11",
|
|
30
30
|
"tweetnacl": "^1.0.3"
|
|
31
|
-
}
|
|
31
|
+
},
|
|
32
|
+
"gitHead": "f8668de32398cd2f583d9bc90ddbd4b5a7425e26"
|
|
32
33
|
}
|
|
@@ -262,9 +262,19 @@ export class Transaction {
|
|
|
262
262
|
|
|
263
263
|
// Sort. Prioritizing first by signer, then by writable
|
|
264
264
|
accountMetas.sort(function(x, y) {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
265
|
+
if (x.isSigner !== y.isSigner) {
|
|
266
|
+
// Signers always come before non-signers
|
|
267
|
+
return x.isSigner ? -1 : 1
|
|
268
|
+
}
|
|
269
|
+
if (x.isWritable !== y.isWritable) {
|
|
270
|
+
// Writable accounts always come before read-only accounts
|
|
271
|
+
return x.isWritable ? -1 : 1
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
const xPubKey = x.pubkey.toBase58().toLowerCase()
|
|
275
|
+
const yPubKey = y.pubkey.toBase58().toLowerCase()
|
|
276
|
+
|
|
277
|
+
return xPubKey < yPubKey ? -1 : xPubKey > yPubKey ? 1 : 0
|
|
268
278
|
})
|
|
269
279
|
|
|
270
280
|
// Cull duplicate account metas
|