@exodus/solana-lib 1.3.11 → 1.3.13

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/solana-lib",
3
- "version": "1.3.11",
3
+ "version": "1.3.13",
4
4
  "description": "Exodus internal Solana low-level library",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -29,5 +29,5 @@
29
29
  "lodash": "^4.17.11",
30
30
  "tweetnacl": "^1.0.3"
31
31
  },
32
- "gitHead": "de10261779745bb46c3fb0ee03821a3527d1d63b"
32
+ "gitHead": "12104775b7a98f110b78e928321ca0d530757d88"
33
33
  }
@@ -32,7 +32,7 @@ class Creator {
32
32
  }
33
33
  }
34
34
 
35
- class Metadata {
35
+ export class Metadata {
36
36
  constructor(args) {
37
37
  this.key = '' // MetadataKey.MetadataV1;
38
38
  this.updateAuthority = args.updateAuthority
@@ -44,7 +44,7 @@ class Metadata {
44
44
  }
45
45
  }
46
46
 
47
- const METADATA_SCHEMA = new Map([
47
+ export const METADATA_SCHEMA = new Map([
48
48
  [
49
49
  Data,
50
50
  {
@@ -85,8 +85,3 @@ const METADATA_SCHEMA = new Map([
85
85
  },
86
86
  ],
87
87
  ])
88
-
89
- module.exports = {
90
- METADATA_SCHEMA,
91
- Metadata,
92
- }
@@ -262,8 +262,9 @@ export class Transaction {
262
262
 
263
263
  // Sort. Prioritizing first by signer, then by writable
264
264
  accountMetas.sort(function(x, y) {
265
+ const pubkeySorting = x.pubkey.toBase58().localeCompare(y.pubkey.toBase58())
265
266
  const checkSigner = x.isSigner === y.isSigner ? 0 : x.isSigner ? -1 : 1
266
- const checkWritable = x.isWritable === y.isWritable ? 0 : x.isWritable ? -1 : 1
267
+ const checkWritable = x.isWritable === y.isWritable ? pubkeySorting : x.isWritable ? -1 : 1
267
268
  return checkSigner || checkWritable
268
269
  })
269
270