@exodus/headless 2.0.0-alpha.52 → 2.0.0-alpha.53
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 +4 -0
- package/package.json +3 -3
- package/src/index.js +0 -2
- package/src/modules/referrals/api.js +0 -13
- package/src/modules/referrals/index.js +0 -28
- package/src/modules/referrals/plugin.js +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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
|
+
## [2.0.0-alpha.53](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.52...@exodus/headless@2.0.0-alpha.53) (2023-06-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @exodus/headless
|
|
9
|
+
|
|
6
10
|
## [2.0.0-alpha.52](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.51...@exodus/headless@2.0.0-alpha.52) (2023-06-23)
|
|
7
11
|
|
|
8
12
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/headless",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.53",
|
|
4
4
|
"description": "The headless Exodus wallet SDK",
|
|
5
5
|
"author": "Exodus Movement Inc",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
"@exodus/nfts": "^2.1.1",
|
|
56
56
|
"@exodus/personal-notes": "^3.2.1",
|
|
57
57
|
"@exodus/rates-monitor": "^2.0.1",
|
|
58
|
-
"@exodus/referrals": "^6.0.1",
|
|
59
58
|
"@exodus/top-movers-monitor": "^2.0.1",
|
|
60
59
|
"@exodus/wallet": "^6.0.1",
|
|
61
60
|
"@exodus/wallet-accounts": "^8.0.1",
|
|
@@ -74,6 +73,7 @@
|
|
|
74
73
|
"@exodus/ethereum-lib": "^2.22.2",
|
|
75
74
|
"@exodus/ethereum-meta": "^1.0.23",
|
|
76
75
|
"@exodus/models": "^8.11.1",
|
|
76
|
+
"@exodus/referrals": "^6.0.2",
|
|
77
77
|
"@exodus/solana-lib": "^1.3.11",
|
|
78
78
|
"@exodus/solana-meta": "^1.0.2",
|
|
79
79
|
"@exodus/storage-encrypted": "^1.1.2",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"nock": "^13.3.1",
|
|
90
90
|
"p-defer": "^4.0.0"
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "5a250a30db9b904f02ca8a4d248fec08cfd57abc"
|
|
93
93
|
}
|
package/src/index.js
CHANGED
|
@@ -23,7 +23,6 @@ import nfts from './modules/nfts'
|
|
|
23
23
|
import personalNotes from './modules/personal-notes'
|
|
24
24
|
import pricing from './modules/pricing'
|
|
25
25
|
import rates from './modules/rates'
|
|
26
|
-
import referrals from './modules/referrals'
|
|
27
26
|
import remoteConfig from './modules/remote-config'
|
|
28
27
|
import topMovers from './modules/top-movers'
|
|
29
28
|
import wallet from './modules/wallet'
|
|
@@ -51,7 +50,6 @@ const createExodus = ({ adapters, config, port }) => {
|
|
|
51
50
|
ioc.use(locale())
|
|
52
51
|
ioc.use(nfts())
|
|
53
52
|
ioc.use(kyc())
|
|
54
|
-
ioc.use(referrals())
|
|
55
53
|
ioc.use(connectedOrigins())
|
|
56
54
|
ioc.use(abTesting())
|
|
57
55
|
ioc.use(personalNotes())
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const referralsApi = ({ referrals }) => ({
|
|
2
|
-
referrals: {
|
|
3
|
-
setReferredBy: referrals.setReferredBy,
|
|
4
|
-
referralCodeExists: referrals.referralCodeExists,
|
|
5
|
-
},
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
id: 'referralsApi',
|
|
10
|
-
type: 'api',
|
|
11
|
-
factory: referralsApi,
|
|
12
|
-
dependencies: ['referrals'],
|
|
13
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { referralsAtomDefinition } from '@exodus/referrals/atoms'
|
|
2
|
-
import referralsDefinition from '@exodus/referrals/module'
|
|
3
|
-
|
|
4
|
-
import referralsApi from './api'
|
|
5
|
-
import referralsPlugin from './plugin'
|
|
6
|
-
|
|
7
|
-
const unsafeStorageAlias = { implementationId: 'unsafeStorage', interfaceId: 'storage' }
|
|
8
|
-
|
|
9
|
-
const referrals = ({ namespace = 'referrals', useUnsafeStorage = true } = {}) => {
|
|
10
|
-
const aliases = useUnsafeStorage ? [unsafeStorageAlias] : []
|
|
11
|
-
|
|
12
|
-
return {
|
|
13
|
-
id: 'referrals',
|
|
14
|
-
definitions: [
|
|
15
|
-
{ definition: referralsAtomDefinition },
|
|
16
|
-
{
|
|
17
|
-
definition: referralsDefinition,
|
|
18
|
-
storage: { namespace },
|
|
19
|
-
writesAtoms: ['referralsAtom'],
|
|
20
|
-
aliases,
|
|
21
|
-
},
|
|
22
|
-
{ definition: referralsPlugin },
|
|
23
|
-
{ definition: referralsApi },
|
|
24
|
-
],
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export default referrals
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const referralsPlugin = ({ referrals, featureFlagAtoms }) => {
|
|
2
|
-
const onUnlock = () => {
|
|
3
|
-
featureFlagAtoms.referrals?.get().then(({ isOn }) => {
|
|
4
|
-
if (!isOn) return
|
|
5
|
-
referrals.load()
|
|
6
|
-
})
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const onUnload = () => {
|
|
10
|
-
referrals.stop()
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return { onUnlock, onUnload }
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default {
|
|
17
|
-
id: 'referralsLifecyclePlugin',
|
|
18
|
-
type: 'plugin',
|
|
19
|
-
factory: referralsPlugin,
|
|
20
|
-
dependencies: ['referrals', 'featureFlagAtoms'],
|
|
21
|
-
}
|