@exodus/solana-lib 1.3.9 → 1.3.10
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 +6 -5
- package/src/vendor/transaction.js +15 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/solana-lib",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.10",
|
|
4
4
|
"description": "Exodus internal Solana low-level library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -13,10 +13,11 @@
|
|
|
13
13
|
"access": "restricted"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@exodus/asset-lib": "^3.
|
|
17
|
-
"@exodus/assets": "^8.0.
|
|
16
|
+
"@exodus/asset-lib": "^3.6.0",
|
|
17
|
+
"@exodus/assets": "^8.0.68",
|
|
18
|
+
"@exodus/assets-base": "^8.0.139",
|
|
18
19
|
"@exodus/buffer-layout": "^1.2.0-exodus1",
|
|
19
|
-
"@exodus/models": "^8.
|
|
20
|
+
"@exodus/models": "^8.7.2",
|
|
20
21
|
"@exodus/solana-spl-token": "0.1.8-exodus.1",
|
|
21
22
|
"@exodus/web3-solana-utils": "^0.14.0",
|
|
22
23
|
"@project-serum/serum": "0.13.64",
|
|
@@ -28,5 +29,5 @@
|
|
|
28
29
|
"lodash": "^4.17.11",
|
|
29
30
|
"tweetnacl": "^1.0.3"
|
|
30
31
|
},
|
|
31
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "c15c374eaf769d76288023a8573b3b120d8922b0"
|
|
32
33
|
}
|
|
@@ -156,9 +156,9 @@ export class Transaction {
|
|
|
156
156
|
/**
|
|
157
157
|
* The transaction fee payer
|
|
158
158
|
*/
|
|
159
|
-
feePayer: PublicKey
|
|
159
|
+
feePayer: PublicKey
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
/**
|
|
162
162
|
* The transaction fee payer (first signer)
|
|
163
163
|
*/
|
|
164
164
|
getFeePayer(): PublicKey | null {
|
|
@@ -229,14 +229,14 @@ export class Transaction {
|
|
|
229
229
|
throw new Error('No instructions provided')
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
let feePayer: PublicKey
|
|
232
|
+
let feePayer: PublicKey
|
|
233
233
|
if (this.feePayer) {
|
|
234
|
-
feePayer = this.feePayer
|
|
234
|
+
feePayer = this.feePayer
|
|
235
235
|
} else if (this.signatures.length > 0 && this.signatures[0].publicKey) {
|
|
236
236
|
// Use implicit fee payer
|
|
237
|
-
feePayer = this.signatures[0].publicKey
|
|
237
|
+
feePayer = this.signatures[0].publicKey
|
|
238
238
|
} else {
|
|
239
|
-
throw new Error('Transaction fee payer required')
|
|
239
|
+
throw new Error('Transaction fee payer required')
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
const programIds: string[] = []
|
|
@@ -282,24 +282,23 @@ export class Transaction {
|
|
|
282
282
|
}
|
|
283
283
|
})
|
|
284
284
|
|
|
285
|
-
const feePayerIndex = uniqueMetas.findIndex(x => {
|
|
286
|
-
return x.pubkey.equals(feePayer)
|
|
287
|
-
})
|
|
285
|
+
const feePayerIndex = uniqueMetas.findIndex((x) => {
|
|
286
|
+
return x.pubkey.equals(feePayer)
|
|
287
|
+
})
|
|
288
288
|
|
|
289
289
|
if (feePayerIndex > -1) {
|
|
290
|
-
const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1)
|
|
291
|
-
payerMeta.isSigner = true
|
|
292
|
-
payerMeta.isWritable = true
|
|
293
|
-
uniqueMetas.unshift(payerMeta)
|
|
290
|
+
const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1)
|
|
291
|
+
payerMeta.isSigner = true
|
|
292
|
+
payerMeta.isWritable = true
|
|
293
|
+
uniqueMetas.unshift(payerMeta)
|
|
294
294
|
} else {
|
|
295
295
|
uniqueMetas.unshift({
|
|
296
296
|
pubkey: feePayer,
|
|
297
297
|
isSigner: true,
|
|
298
|
-
isWritable: true
|
|
299
|
-
})
|
|
298
|
+
isWritable: true,
|
|
299
|
+
})
|
|
300
300
|
} // Disallow unknown signers
|
|
301
301
|
|
|
302
|
-
|
|
303
302
|
// Move payer to the front and disallow unknown signers
|
|
304
303
|
this.signatures.forEach((signature, signatureIndex) => {
|
|
305
304
|
const isPayer = signatureIndex === 0
|