@exodus/solana-plugin 1.32.3 → 1.33.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/package.json +3 -3
- package/src/create-asset.js +3 -2
- package/src/send-validations.js +10 -6
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.33.0](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.32.3...@exodus/solana-plugin@1.33.0) (2026-03-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* feat: add asset family utils (#7519)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [1.32.4](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.32.3...@exodus/solana-plugin@1.32.4) (2026-02-25)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* fix(solana): validate sending to a token-2022 address (#7465)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
## [1.32.3](https://github.com/ExodusMovement/assets/compare/@exodus/solana-plugin@1.32.2...@exodus/solana-plugin@1.32.3) (2026-02-13)
|
|
7
27
|
|
|
8
28
|
**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.
|
|
3
|
+
"version": "1.33.0",
|
|
4
4
|
"description": "Solana plugin for Exodus SDK powered wallets.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@exodus/asset-lib": "^5.0.0",
|
|
26
|
-
"@exodus/assets": "^11.
|
|
26
|
+
"@exodus/assets": "^11.8.0",
|
|
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",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"type": "git",
|
|
45
45
|
"url": "git+https://github.com/ExodusMovement/assets.git"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "42e1b61decefbb1dc8f34e041856520d3f367945"
|
|
48
48
|
}
|
package/src/create-asset.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { connectAssetsList } from '@exodus/assets'
|
|
1
|
+
import { ASSET_FAMILY, connectAssetsList } from '@exodus/assets'
|
|
2
2
|
import bip44Constants from '@exodus/bip44-constants/by-ticker.js'
|
|
3
3
|
import {
|
|
4
4
|
Api,
|
|
@@ -139,7 +139,7 @@ export const createSolanaAssetFactory =
|
|
|
139
139
|
mintAddress,
|
|
140
140
|
name,
|
|
141
141
|
api: {
|
|
142
|
-
features: {},
|
|
142
|
+
features: { family: ASSET_FAMILY.SOLANA },
|
|
143
143
|
getBalances: (...args) => api.getBalances(...args),
|
|
144
144
|
},
|
|
145
145
|
})
|
|
@@ -159,6 +159,7 @@ export const createSolanaAssetFactory =
|
|
|
159
159
|
const features = {
|
|
160
160
|
accountState: true,
|
|
161
161
|
customTokens: base.name === 'solana',
|
|
162
|
+
family: ASSET_FAMILY.SOLANA,
|
|
162
163
|
feeMonitor: false,
|
|
163
164
|
feesApi: true,
|
|
164
165
|
nfts: true,
|
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
|
|