@exodus/solana-plugin 1.32.2 → 1.32.4
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 +18 -0
- package/package.json +3 -3
- package/src/create-asset.js +6 -9
- package/src/send-validations.js +10 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
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.32.4](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.32.3...@exodus/solana-plugin@1.32.4) (2026-02-25)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* fix(solana): validate sending to a token-2022 address (#7465)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [1.32.3](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.32.2...@exodus/solana-plugin@1.32.3) (2026-02-13)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @exodus/solana-plugin
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [1.32.2](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.32.1...@exodus/solana-plugin@1.32.2) (2026-02-12)
|
|
7
25
|
|
|
8
26
|
**Note:** Version bump only for package @exodus/solana-plugin
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/solana-plugin",
|
|
3
|
-
"version": "1.32.
|
|
3
|
+
"version": "1.32.4",
|
|
4
4
|
"description": "Solana plugin for Exodus SDK powered wallets.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@exodus/bip44-constants": "^195.0.0",
|
|
28
28
|
"@exodus/i18n-dummy": "^1.0.0",
|
|
29
29
|
"@exodus/send-validation-model": "^1.0.0",
|
|
30
|
-
"@exodus/solana-api": "^3.29.
|
|
30
|
+
"@exodus/solana-api": "^3.29.4",
|
|
31
31
|
"@exodus/solana-lib": "^3.20.1",
|
|
32
32
|
"@exodus/solana-meta": "^2.3.1",
|
|
33
33
|
"@exodus/web3-solana-utils": "^2.9.0",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"type": "git",
|
|
45
45
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "234305491e03390578c75123b3f8d9f603e7c5de"
|
|
48
48
|
}
|
package/src/create-asset.js
CHANGED
|
@@ -120,9 +120,8 @@ export const createSolanaAssetFactory =
|
|
|
120
120
|
})
|
|
121
121
|
|
|
122
122
|
const stakingApi = stakingApiFactory({
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
sendTx,
|
|
123
|
+
assetName: baseAssetName,
|
|
124
|
+
assetClientInterface,
|
|
126
125
|
})
|
|
127
126
|
|
|
128
127
|
const initAgentWallet = createInitAgentWalletFactory({
|
|
@@ -203,11 +202,10 @@ export const createSolanaAssetFactory =
|
|
|
203
202
|
assetClientInterface,
|
|
204
203
|
})
|
|
205
204
|
|
|
206
|
-
const { approveDelegation, revokeDelegation
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
})
|
|
205
|
+
const { approveDelegation, revokeDelegation } = createTokenDelegationFactory({
|
|
206
|
+
api: defaultApi,
|
|
207
|
+
assetClientInterface,
|
|
208
|
+
})
|
|
211
209
|
|
|
212
210
|
const createHistoryMonitor = createHistoryMonitorFactory({
|
|
213
211
|
monitorType,
|
|
@@ -276,7 +274,6 @@ export const createSolanaAssetFactory =
|
|
|
276
274
|
approveDelegation,
|
|
277
275
|
bip44,
|
|
278
276
|
accountReserve,
|
|
279
|
-
getDelegatedAddresses,
|
|
280
277
|
initAgentWallet,
|
|
281
278
|
lowBalance,
|
|
282
279
|
MIN_STAKING_AMOUNT,
|
package/src/send-validations.js
CHANGED
|
@@ -36,7 +36,7 @@ const sendValidationsFactory = ({ api, assetName, assetClientInterface }) => {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
const addressDetails = await getAccountInfoCached(destinationAddress)
|
|
39
|
-
if (
|
|
39
|
+
if (['token', 'token-2022'].includes(addressDetails.addressType)) {
|
|
40
40
|
return t(
|
|
41
41
|
`The Solana network doesn't allow sending ${asset.displayTicker} to a Token Account address.`
|
|
42
42
|
)
|
|
@@ -74,11 +74,15 @@ const sendValidationsFactory = ({ api, assetName, assetClientInterface }) => {
|
|
|
74
74
|
id: 'SOL_RENT_EXEMPT_AMOUNT',
|
|
75
75
|
type: VALIDATION_TYPES.ERROR,
|
|
76
76
|
shouldValidate: ({ asset, sendAmount }) => sendAmount,
|
|
77
|
-
isValid: async ({ asset, destinationAddress, sendAmount,
|
|
77
|
+
isValid: async ({ asset, destinationAddress, sendAmount, feeAssetBalances, fees }) => {
|
|
78
78
|
if (!destinationAddress || !sendAmount || sendAmount.isZero || fees?.usedFeePayer === true) {
|
|
79
79
|
return true
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
if (!feeAssetBalances?.spendable) {
|
|
83
|
+
return true
|
|
84
|
+
}
|
|
85
|
+
|
|
82
86
|
const rentExemptValue = await api.getRentExemptionMinAmount(destinationAddress)
|
|
83
87
|
const rentExemptAmount = asset.baseAsset.currency.baseUnit(rentExemptValue)
|
|
84
88
|
|
|
@@ -90,7 +94,7 @@ const sendValidationsFactory = ({ api, assetName, assetClientInterface }) => {
|
|
|
90
94
|
} else {
|
|
91
95
|
// sending token
|
|
92
96
|
// check destination address rent exemption
|
|
93
|
-
isEnoughForRent =
|
|
97
|
+
isEnoughForRent = feeAssetBalances.spendable
|
|
94
98
|
.sub(fees?.fee || asset.feeAsset.currency.ZERO)
|
|
95
99
|
.gte(rentExemptAmount)
|
|
96
100
|
}
|
|
@@ -113,10 +117,10 @@ const sendValidationsFactory = ({ api, assetName, assetClientInterface }) => {
|
|
|
113
117
|
asset,
|
|
114
118
|
sendAmount,
|
|
115
119
|
fees,
|
|
116
|
-
|
|
120
|
+
feeAssetBalances,
|
|
117
121
|
fromWalletAccount,
|
|
118
122
|
}) => {
|
|
119
|
-
if (!sendAmount || !fees || !
|
|
123
|
+
if (!sendAmount || !fees || !feeAssetBalances?.spendable || !fromWalletAccount) {
|
|
120
124
|
return
|
|
121
125
|
}
|
|
122
126
|
|
|
@@ -138,7 +142,7 @@ const sendValidationsFactory = ({ api, assetName, assetClientInterface }) => {
|
|
|
138
142
|
|
|
139
143
|
const rentExemptAmount = accountState.rentExemptAmount
|
|
140
144
|
|
|
141
|
-
const remaining =
|
|
145
|
+
const remaining = feeAssetBalances.spendable
|
|
142
146
|
.sub(fees?.fee || asset.feeAsset.currency.ZERO)
|
|
143
147
|
.sub(sendingSolAmount)
|
|
144
148
|
|