@exodus/solana-plugin 1.12.0 → 1.12.2
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/CHANGELOG.md +17 -0
- package/package.json +3 -3
- package/src/create-asset.js +3 -3
- package/src/web3/createSimulateTransactions.js +3 -15
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.12.2](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.12.1...@exodus/solana-plugin@1.12.2) (2024-06-19)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @exodus/solana-plugin
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.12.1](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.12.0...@exodus/solana-plugin@1.12.1) (2024-06-18)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* solana getFeeAsync compatibility ([#2602](https://github.com/ExodusMovement/assets/issues/2602)) ([0e4d216](https://github.com/ExodusMovement/assets/commit/0e4d216e4bbde3a3907dc4810c1a4096596afc7e))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
## [1.12.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.11.0...@exodus/solana-plugin@1.12.0) (2024-06-14)
|
|
7
24
|
|
|
8
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/solana-plugin",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.2",
|
|
4
4
|
"description": "Exodus internal Solana asset plugin",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@exodus/assets": "^9.0.1",
|
|
24
24
|
"@exodus/bip44-constants": "^195.0.0",
|
|
25
25
|
"@exodus/solana-api": "^3.7.0",
|
|
26
|
-
"@exodus/solana-lib": "^3.
|
|
26
|
+
"@exodus/solana-lib": "^3.5.0",
|
|
27
27
|
"@exodus/solana-meta": "^1.0.7",
|
|
28
28
|
"@exodus/web3-solana-utils": "^2.0.0",
|
|
29
29
|
"minimalistic-assert": "^1.0.1",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"type": "git",
|
|
40
40
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "61b8ec6544e7a62a774f0e74e6a1b623371742fa"
|
|
43
43
|
}
|
package/src/create-asset.js
CHANGED
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
createGetKeyIdentifier,
|
|
5
5
|
getAddressFromPublicKey,
|
|
6
6
|
getEncodedSecretKey,
|
|
7
|
-
fillTransactionWithEmptySignatureSlot,
|
|
8
7
|
isValidAddress,
|
|
9
8
|
prepareForSigning,
|
|
10
9
|
signUnsignedTx,
|
|
@@ -166,7 +165,9 @@ export const createSolanaAssetFactory =
|
|
|
166
165
|
getBalanceForAddress: createGetBalanceForAddress({ api: serverApi, asset: base }),
|
|
167
166
|
getDefaultAddressPath: () => defaultAddressPath,
|
|
168
167
|
getFee: (args) => args?.feeData?.fee || feeData.fee,
|
|
169
|
-
getFeeAsync: async ({ feeData }) =>
|
|
168
|
+
getFeeAsync: async ({ feeData }) => {
|
|
169
|
+
return { fee: feeData.fee }
|
|
170
|
+
},
|
|
170
171
|
getFeeData: () => feeData,
|
|
171
172
|
getSupportedPurposes: () => [44],
|
|
172
173
|
getKeyIdentifier: createGetKeyIdentifier({ bip44, assetName: base.name }),
|
|
@@ -191,7 +192,6 @@ export const createSolanaAssetFactory =
|
|
|
191
192
|
web3: createWeb3API({
|
|
192
193
|
asset: base,
|
|
193
194
|
assetClientInterface,
|
|
194
|
-
fillTransactionWithEmptySignatureSlot,
|
|
195
195
|
prepareForSigning,
|
|
196
196
|
}),
|
|
197
197
|
}
|
|
@@ -5,30 +5,18 @@ import {
|
|
|
5
5
|
} from '@exodus/web3-solana-utils'
|
|
6
6
|
|
|
7
7
|
// This function accepts either a list of transactions created by a wallet (unsignedTxs) or a web3 transaction (transactionBuffers).
|
|
8
|
-
export const createSimulateTransactions = ({
|
|
9
|
-
asset,
|
|
10
|
-
assetClientInterface,
|
|
11
|
-
fillTransactionWithEmptySignatureSlot,
|
|
12
|
-
prepareForSigning,
|
|
13
|
-
}) => {
|
|
8
|
+
export const createSimulateTransactions = ({ asset, assetClientInterface, prepareForSigning }) => {
|
|
14
9
|
assert(asset, '"asset" should be passed.')
|
|
15
10
|
assert(assetClientInterface, '"assetClientInterface" should be passed.')
|
|
16
11
|
assert(prepareForSigning, '"prepareForSigning" should be passed.')
|
|
17
|
-
assert(
|
|
18
|
-
fillTransactionWithEmptySignatureSlot,
|
|
19
|
-
'"fillTransactionWithEmptySignatureSlot" should be passed.'
|
|
20
|
-
)
|
|
21
12
|
|
|
22
13
|
const simulateSolanaTransactions = createSimulateSolanaTransactions({ assetClientInterface })
|
|
23
14
|
|
|
24
15
|
return function simulateTransactions({ transactionBuffers, unsignedTxs, ...restParameters }) {
|
|
25
16
|
if (unsignedTxs) {
|
|
26
|
-
// Converts to web3.js
|
|
17
|
+
// Converts to web3.js VersionedTransaction class instances.
|
|
27
18
|
const transactions = unsignedTxs.map((unsignedTx) => {
|
|
28
|
-
|
|
29
|
-
fillTransactionWithEmptySignatureSlot({ transaction, publicKey: transaction.feePayer })
|
|
30
|
-
|
|
31
|
-
return transaction
|
|
19
|
+
return prepareForSigning(unsignedTx)
|
|
32
20
|
})
|
|
33
21
|
|
|
34
22
|
return simulateSolanaTransactions({
|