@exodus/solana-plugin 1.9.2 → 1.10.1
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.1",
|
|
4
4
|
"description": "Exodus internal Solana asset plugin",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@exodus/assets": "^9.0.1",
|
|
23
23
|
"@exodus/bip44-constants": "^195.0.0",
|
|
24
|
-
"@exodus/solana-api": "^3.
|
|
25
|
-
"@exodus/solana-lib": "^3.
|
|
24
|
+
"@exodus/solana-api": "^3.6.1",
|
|
25
|
+
"@exodus/solana-lib": "^3.4.2",
|
|
26
26
|
"@exodus/solana-meta": "^1.0.7",
|
|
27
27
|
"@exodus/web3-solana-utils": "^1.65.0",
|
|
28
28
|
"minimalistic-assert": "^1.0.1",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@exodus/assets-testing": "^1.0.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "9d24eb58422692fc1acdcb834061d02b2632801d"
|
|
35
35
|
}
|
package/src/create-asset.js
CHANGED
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
getEncodedSecretKey,
|
|
7
7
|
fillTransactionWithEmptySignatureSlot,
|
|
8
8
|
isValidAddress,
|
|
9
|
-
parseUnsignedTx,
|
|
10
9
|
prepareForSigning,
|
|
11
10
|
signUnsignedTx,
|
|
12
11
|
signUnsignedTxWithSigner,
|
|
@@ -160,13 +159,11 @@ export const createSolanaAssetFactory =
|
|
|
160
159
|
.map(createToken),
|
|
161
160
|
getUnstakingFee,
|
|
162
161
|
hasFeature: (feature) => !!features[feature], // @deprecated use api.features instead
|
|
163
|
-
parseUnsignedTx: (unsignedTx) => parseUnsignedTx({ asset: base, unsignedTx }),
|
|
164
162
|
sendTx,
|
|
165
163
|
signTx: ({ unsignedTx, privateKey, signer }) =>
|
|
166
164
|
signer
|
|
167
165
|
? signUnsignedTxWithSigner(unsignedTx, signer)
|
|
168
166
|
: signUnsignedTx(unsignedTx, privateKey),
|
|
169
|
-
signUnsignedTx,
|
|
170
167
|
signHardware,
|
|
171
168
|
signMessage: ({ privateKey, signer, message }) =>
|
|
172
169
|
signer
|
|
@@ -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
|
}
|