@exodus/solana-plugin 1.9.1 → 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.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Exodus internal Solana asset plugin",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@exodus/assets": "^9.0.1",
|
|
23
23
|
"@exodus/bip44-constants": "^195.0.0",
|
|
24
|
-
"@exodus/solana-api": "^3.4.
|
|
24
|
+
"@exodus/solana-api": "^3.4.2",
|
|
25
25
|
"@exodus/solana-lib": "^3.3.1",
|
|
26
26
|
"@exodus/solana-meta": "^1.0.7",
|
|
27
27
|
"@exodus/web3-solana-utils": "^1.65.0",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@exodus/assets-testing": "^1.0.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "ed174d5b68ce6de4a700f53e8aa490dc4ad75644"
|
|
35
35
|
}
|
package/src/create-asset.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import assert from 'minimalistic-assert'
|
|
2
|
-
import {
|
|
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
|
}
|