@exodus/solana-plugin 1.9.2 → 1.10.0

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-plugin",
3
- "version": "1.9.2",
3
+ "version": "1.10.0",
4
4
  "description": "Exodus internal Solana asset plugin",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -31,5 +31,5 @@
31
31
  "devDependencies": {
32
32
  "@exodus/assets-testing": "^1.0.0"
33
33
  },
34
- "gitHead": "a780988c920ac32cfc7e367686bb165170641470"
34
+ "gitHead": "ed174d5b68ce6de4a700f53e8aa490dc4ad75644"
35
35
  }
@@ -166,7 +166,6 @@ export const createSolanaAssetFactory =
166
166
  signer
167
167
  ? signUnsignedTxWithSigner(unsignedTx, signer)
168
168
  : signUnsignedTx(unsignedTx, privateKey),
169
- signUnsignedTx,
170
169
  signHardware,
171
170
  signMessage: ({ privateKey, signer, message }) =>
172
171
  signer
@@ -1,5 +1,8 @@
1
1
  import assert from 'minimalistic-assert'
2
- import { createSimulateTransactions as createSimulateSolanaTransactions } from '@exodus/web3-solana-utils'
2
+ import {
3
+ createSimulateTransactions as createSimulateSolanaTransactions,
4
+ deserializeTransactionBytes,
5
+ } from '@exodus/web3-solana-utils'
3
6
 
4
7
  // This function accepts either a list of transactions created by a wallet (unsignedTxs) or a web3 transaction (transactionBuffers).
5
8
  export const createSimulateTransactions = ({
@@ -32,5 +35,18 @@ export const createSimulateTransactions = ({
32
35
  ...restParameters,
33
36
  })
34
37
  }
38
+
39
+ if (transactionBuffers) {
40
+ // Converts to web3.js Transaction class instances.
41
+ const transactions = transactionBuffers.map((transactionBuffer) =>
42
+ deserializeTransactionBytes(transactionBuffer)
43
+ )
44
+
45
+ return simulateSolanaTransactions({
46
+ asset,
47
+ transactions,
48
+ ...restParameters,
49
+ })
50
+ }
35
51
  }
36
52
  }