@exodus/assets-feature 6.0.3 → 6.1.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 +12 -0
- package/README.md +2 -2
- package/atoms/legacy-address-mode.js +4 -1
- package/atoms/multi-address-mode.js +11 -3
- package/atoms/taproot-address-mode.js +4 -1
- package/package.json +5 -5
- package/redux/selectors/index.d.ts +20 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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
|
+
## [6.1.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@6.0.4...@exodus/assets-feature@6.1.0) (2025-02-10)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- feat: add legacyAddressMode and taprootAddressMode selector types (#11399)
|
|
11
|
+
|
|
12
|
+
## [6.0.4](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@6.0.3...@exodus/assets-feature@6.0.4) (2025-01-17)
|
|
13
|
+
|
|
14
|
+
### Performance
|
|
15
|
+
|
|
16
|
+
- perf: assets feature fusion setting (#11124)
|
|
17
|
+
|
|
6
18
|
## [6.0.3](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@6.0.2...@exodus/assets-feature@6.0.3) (2025-01-10)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -40,11 +40,11 @@ See [api/index.d.ts](./api/index.d.ts) for more details on the API and token val
|
|
|
40
40
|
|
|
41
41
|
### API Side
|
|
42
42
|
|
|
43
|
-
See [using the sdk](../../docs/
|
|
43
|
+
See [using the sdk](../../docs/development/using-the-sdk.md#setup-the-api-side) for more details on how features plug into the SDK and the API interface in the [type declaration](./api/index.d.ts).
|
|
44
44
|
|
|
45
45
|
### UI Side
|
|
46
46
|
|
|
47
|
-
See [using the sdk](../../docs/
|
|
47
|
+
See [using the sdk](../../docs/development/using-the-sdk.md#events) for more details on basic UI-side setup.
|
|
48
48
|
|
|
49
49
|
```js
|
|
50
50
|
import selectors from '~/ui/flux/selectors'
|
|
@@ -15,7 +15,10 @@ const createLegacyAddressModeAtom = ({ fusion }) => {
|
|
|
15
15
|
const set = async (value) => {
|
|
16
16
|
const { bitcoin } = typeof value === 'function' ? value(await computedAtom.get()) : value
|
|
17
17
|
|
|
18
|
-
await bitcoinFusionAtom.
|
|
18
|
+
const bitcoinPreviousValue = await bitcoinFusionAtom.get()
|
|
19
|
+
if (bitcoinPreviousValue !== bitcoin) {
|
|
20
|
+
await bitcoinFusionAtom.set(bitcoin || false)
|
|
21
|
+
}
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
return { ...computedAtom, set }
|
|
@@ -41,10 +41,18 @@ const createMultiAddressModeAtom = ({ storage, fusion, logger, config }) => {
|
|
|
41
41
|
...rest
|
|
42
42
|
} = typeof value === 'function' ? value(await computedAtom.get()) : value
|
|
43
43
|
|
|
44
|
-
// Do not write in fusion in parallel
|
|
45
|
-
await moneroFusionAtom.set(monero)
|
|
46
|
-
await bitcoinFusionAtom.set(bitcoin)
|
|
47
44
|
await storageAtom.set(rest)
|
|
45
|
+
|
|
46
|
+
// Do not write in fusion in parallel
|
|
47
|
+
const moneroPreviousValue = await moneroFusionAtom.get()
|
|
48
|
+
if (moneroPreviousValue !== monero) {
|
|
49
|
+
await moneroFusionAtom.set(monero)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const bitcoinPreviousValue = await bitcoinFusionAtom.get()
|
|
53
|
+
if (bitcoinPreviousValue !== bitcoin) {
|
|
54
|
+
await bitcoinFusionAtom.set(bitcoin)
|
|
55
|
+
}
|
|
48
56
|
}
|
|
49
57
|
|
|
50
58
|
const reset = async () => {
|
|
@@ -15,7 +15,10 @@ const createTaprootAddressModeAtom = ({ fusion }) => {
|
|
|
15
15
|
const set = async (value) => {
|
|
16
16
|
const { bitcoin } = typeof value === 'function' ? value(await computedAtom.get()) : value
|
|
17
17
|
|
|
18
|
-
await bitcoinFusionAtom.
|
|
18
|
+
const bitcoinPreviousValue = await bitcoinFusionAtom.get()
|
|
19
|
+
if (bitcoinPreviousValue !== bitcoin) {
|
|
20
|
+
await bitcoinFusionAtom.set(bitcoin || false)
|
|
21
|
+
}
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
return { ...computedAtom, set }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/assets-feature",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "This Exodus SDK feature provides access to instances of all blockchain asset adapters supported by the wallet, and enables you to search for and add custom tokens at runtime.",
|
|
6
6
|
"type": "module",
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
"@exodus/fusion-local": "^2.1.0",
|
|
62
62
|
"@exodus/keychain": "^7.3.0",
|
|
63
63
|
"@exodus/logger": "^1.2.3",
|
|
64
|
-
"@exodus/models": "^12.
|
|
64
|
+
"@exodus/models": "^12.5.0",
|
|
65
65
|
"@exodus/osmosis-plugin": "^1.3.3",
|
|
66
|
-
"@exodus/public-key-provider": "^4.0
|
|
66
|
+
"@exodus/public-key-provider": "^4.1.0",
|
|
67
67
|
"@exodus/redux-dependency-injection": "^4.1.1",
|
|
68
68
|
"@exodus/storage-memory": "^2.2.2",
|
|
69
|
-
"@exodus/wallet-accounts": "^17.1
|
|
69
|
+
"@exodus/wallet-accounts": "^17.2.1",
|
|
70
70
|
"@exodus/wild-emitter": "^1.0.0",
|
|
71
71
|
"bip39": "^3.1.0",
|
|
72
72
|
"events": "^3.3.0",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "390f1af0583b9fb4adb6bdc5be2190b3635ffa95"
|
|
80
80
|
}
|
|
@@ -54,6 +54,24 @@ declare const createMultiAddressModeSelectorDefinition: {
|
|
|
54
54
|
dependencies: [{ selector: 'multiAddressMode' }]
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
type LegacyAddressModeDataSelector = (state: State) => { [assetName: string]: boolean }
|
|
58
|
+
declare const createLegacyAddressModeSelectorDefinition: {
|
|
59
|
+
id: 'createLegacyAddressMode'
|
|
60
|
+
selectorFactory: (
|
|
61
|
+
legacyAddressModeDataSelector: LegacyAddressModeDataSelector
|
|
62
|
+
) => (assetName: string) => (legacyAddressModeData: { [assetName: string]: boolean }) => boolean
|
|
63
|
+
dependencies: [{ selector: 'legacyAddressMode' }]
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
type TaprootAddressModeDataSelector = (state: State) => { [assetName: string]: boolean }
|
|
67
|
+
declare const createTaprootAddressModeSelectorDefinition: {
|
|
68
|
+
id: 'createTaprootAddressMode'
|
|
69
|
+
selectorFactory: (
|
|
70
|
+
taprootAddressModeDataSelector: TaprootAddressModeDataSelector
|
|
71
|
+
) => (assetName: string) => (taprootAddressModeData: { [assetName: string]: boolean }) => boolean
|
|
72
|
+
dependencies: [{ selector: 'taprootAddressMode' }]
|
|
73
|
+
}
|
|
74
|
+
|
|
57
75
|
type DisabledPurposesDataSelector = (state: State) => { [assetName: string]: number[] }
|
|
58
76
|
declare const createDisabledPurposesSelectorDefinition: {
|
|
59
77
|
id: 'createDisabledPurposes'
|
|
@@ -72,6 +90,8 @@ declare const selectorDefinitions: [
|
|
|
72
90
|
typeof getAssetSelectorDefinition,
|
|
73
91
|
typeof getAssetFromTickerSelectorDefinition,
|
|
74
92
|
typeof createMultiAddressModeSelectorDefinition,
|
|
93
|
+
typeof createLegacyAddressModeSelectorDefinition,
|
|
94
|
+
typeof createTaprootAddressModeSelectorDefinition,
|
|
75
95
|
typeof createDisabledPurposesSelectorDefinition,
|
|
76
96
|
]
|
|
77
97
|
|