@exodus/solana-plugin 1.20.0 → 1.21.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/CHANGELOG.md +20 -0
- package/README.md +2 -0
- package/package.json +4 -4
- package/src/create-asset.js +9 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
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.21.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.20.1...@exodus/solana-plugin@1.21.0) (2025-05-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* feat(solana): make shouldUpdateBalanceBeforeHistory configurable (#5544)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [1.20.1](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.20.0...@exodus/solana-plugin@1.20.1) (2025-04-21)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* fix: SOL fees for Desktop (#5417)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
## [1.20.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.19.0...@exodus/solana-plugin@1.20.0) (2025-04-08)
|
|
7
27
|
|
|
8
28
|
|
package/README.md
CHANGED
|
@@ -36,6 +36,7 @@ const asset = createAsset({
|
|
|
36
36
|
stakingFeatureAvailable: true,
|
|
37
37
|
includeUnparsed: false,
|
|
38
38
|
monitorInterval: ms('30s'),
|
|
39
|
+
shouldUpdateBalanceBeforeHistory: true,
|
|
39
40
|
defaultAccountReserve: DEFAULT_ACCOUNT_RESERVE,
|
|
40
41
|
defaultLowBalance: DEFAULT_LOW_BALANCE,
|
|
41
42
|
defaultMinStakingAmount: DEFAULT_MIN_STAKING_AMOUNT,
|
|
@@ -62,6 +63,7 @@ Creates a factory function for creating Solana assets.
|
|
|
62
63
|
- `stakingFeatureAvailable` (Boolean): Indicates if staking feature is available.
|
|
63
64
|
- `includeUnparsed` (Boolean): Whether to include unparsed transactions.
|
|
64
65
|
- `monitorInterval` (String): Interval for monitoring transactions, e.g., '30s'.
|
|
66
|
+
- `shouldUpdateBalanceBeforeHistory` (Boolean): Indicates if we should update balance independently from history.
|
|
65
67
|
- `defaultAccountReserve` (Number): Default reserve amount for accounts.
|
|
66
68
|
- `defaultLowBalance` (Number): Default low balance threshold.
|
|
67
69
|
- `defaultMinStakingAmount` (Number): Default minimum staking amount.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/solana-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0",
|
|
4
4
|
"description": "Solana plugin for Exodus SDK powered wallets.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@exodus/assets": "^11.0.0",
|
|
25
25
|
"@exodus/bip44-constants": "^195.0.0",
|
|
26
|
-
"@exodus/solana-api": "^3.
|
|
27
|
-
"@exodus/solana-lib": "^3.
|
|
26
|
+
"@exodus/solana-api": "^3.18.0",
|
|
27
|
+
"@exodus/solana-lib": "^3.11.1",
|
|
28
28
|
"@exodus/solana-meta": "^2.3.1",
|
|
29
29
|
"@exodus/web3-solana-utils": "^2.9.0",
|
|
30
30
|
"minimalistic-assert": "^1.0.1",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"type": "git",
|
|
41
41
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "74fe0904cd863e2674e4c2e705a2e8624a8a92be"
|
|
44
44
|
}
|
package/src/create-asset.js
CHANGED
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
createAndBroadcastTXFactory,
|
|
6
6
|
getBalancesFactory,
|
|
7
7
|
getFeeAsyncFactory,
|
|
8
|
-
getUnstakingFee,
|
|
9
8
|
isSolanaRewardsActivityTx,
|
|
10
9
|
SolanaMonitor,
|
|
11
10
|
} from '@exodus/solana-api'
|
|
@@ -40,6 +39,7 @@ export const createSolanaAssetFactory =
|
|
|
40
39
|
includeUnparsed = false,
|
|
41
40
|
allowSendingAll = true,
|
|
42
41
|
monitorInterval = ms('30s'),
|
|
42
|
+
shouldUpdateBalanceBeforeHistory = true,
|
|
43
43
|
defaultAccountReserve = DEFAULT_ACCOUNT_RESERVE,
|
|
44
44
|
defaultLowBalance = DEFAULT_LOW_BALANCE,
|
|
45
45
|
defaultMinStakingAmount = DEFAULT_MIN_STAKING_AMOUNT,
|
|
@@ -137,7 +137,12 @@ export const createSolanaAssetFactory =
|
|
|
137
137
|
const getFee = ({ feeData }) => {
|
|
138
138
|
const priorityFee = feeData.priorityFee ?? 0
|
|
139
139
|
// NOTE: fee is bumped via remote config, eventually fee = feeData.fee + (priorityFee * unitsConsumed * feeData.computeUnitsMultiplier)
|
|
140
|
-
const
|
|
140
|
+
const computeUnits = 450 // standard SOL transfer // HACK: solana needs to use getFeeAsync
|
|
141
|
+
|
|
142
|
+
const fee = feeData.baseFee.add(
|
|
143
|
+
base.currency.baseUnit(priorityFee).mul(computeUnits).div(1_000_000) // micro lamports to lamports
|
|
144
|
+
)
|
|
145
|
+
|
|
141
146
|
return { fee, priorityFee }
|
|
142
147
|
}
|
|
143
148
|
|
|
@@ -152,6 +157,7 @@ export const createSolanaAssetFactory =
|
|
|
152
157
|
new SolanaMonitor({
|
|
153
158
|
assetClientInterface,
|
|
154
159
|
interval: monitorInterval,
|
|
160
|
+
shouldUpdateBalanceBeforeHistory,
|
|
155
161
|
ticksBetweenHistoryFetches,
|
|
156
162
|
ticksBetweenStakeFetches,
|
|
157
163
|
includeUnparsed,
|
|
@@ -175,7 +181,6 @@ export const createSolanaAssetFactory =
|
|
|
175
181
|
Object.values(assets)
|
|
176
182
|
.filter((asset) => asset.name !== base.name)
|
|
177
183
|
.map(createToken),
|
|
178
|
-
getUnstakingFee,
|
|
179
184
|
hasFeature: (feature) => !!features[feature], // @deprecated use api.features instead
|
|
180
185
|
privateKeyEncodingDefinition: { encoding: 'base58', data: 'priv|pub' },
|
|
181
186
|
sendTx,
|
|
@@ -215,6 +220,7 @@ export const createSolanaAssetFactory =
|
|
|
215
220
|
stakingFeatureAvailable,
|
|
216
221
|
includeUnparsed,
|
|
217
222
|
monitorInterval,
|
|
223
|
+
shouldUpdateBalanceBeforeHistory,
|
|
218
224
|
defaultAccountReserve,
|
|
219
225
|
defaultLowBalance,
|
|
220
226
|
defaultMinStakingAmount,
|