@exodus/ethereum-lib 4.0.5 → 4.1.0-alpha.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-lib",
3
- "version": "4.0.5",
3
+ "version": "4.1.0-alpha.1",
4
4
  "description": "Ethereum Library",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -42,6 +42,5 @@
42
42
  "lodash": "^4.17.15",
43
43
  "ms": "^2.1.1",
44
44
  "reselect": "~3.0.1"
45
- },
46
- "gitHead": "ae3d9c8735bfd46d0e0efd39f4077202f2abb710"
45
+ }
47
46
  }
@@ -1,5 +1,4 @@
1
1
  const ethStakeAccountState = ({ currency }) => ({
2
- enabled: true,
3
2
  isDelegating: false,
4
3
  isUndelegateInProgress: false,
5
4
  canClaimUndelegatedBalance: false,
@@ -11,7 +10,6 @@ const ethStakeAccountState = ({ currency }) => ({
11
10
 
12
11
  const assetStakingData = {
13
12
  polygon: ({ currency }) => ({
14
- enabled: true,
15
13
  isDelegating: false,
16
14
  // Unstaking takes ~3-4 days, after that, user needs to
17
15
  // claim the unstaked amount (initial staked amount)
package/src/constants.js CHANGED
@@ -21,8 +21,9 @@ const CHAIN_DATA = {
21
21
  },
22
22
  bsc: {
23
23
  chainId: 56,
24
- serverUrl: 'https://bsc.a.exodus.io/wallet/v1/',
24
+ serverUrl: 'https://bsc-clarity.a.exodus.io/',
25
25
  confirmationsNumber: 15,
26
+ monitorType: 'clarity',
26
27
  tokenType: 'BSC_BEP20',
27
28
  },
28
29
  matic: {
@@ -1,6 +1,8 @@
1
1
  import assert from 'minimalistic-assert'
2
2
  import { createGetKeyIdentifier, unhardenDerivationIndex } from '@exodus/key-utils'
3
3
 
4
+ const HARDWARE_WALLETS = new Set(['ledger', 'trezor'])
5
+
4
6
  const createEthereumGetKeyIdentifier = ({
5
7
  bip44,
6
8
  assetName,
@@ -15,7 +17,8 @@ const createEthereumGetKeyIdentifier = ({
15
17
  ...partialParams,
16
18
  }
17
19
 
18
- const { accountIndex, compatibilityMode, addressIndex } = params
20
+ const { accountIndex, addressIndex, compatibilityMode } = params
21
+ const isHardwareWallet = HARDWARE_WALLETS.has(compatibilityMode)
19
22
  const unhardenedBip44 = unhardenDerivationIndex(bip44)
20
23
  const isMetaMask = allowMetaMaskCompat && compatibilityMode === 'metamask'
21
24
 
@@ -35,6 +38,7 @@ const createEthereumGetKeyIdentifier = ({
35
38
  keyType,
36
39
  validationRules: {
37
40
  allowMultipleAddresses: true,
41
+ allowXPUB: isHardwareWallet,
38
42
  },
39
43
  })(params)
40
44
  }
package/LICENSE.md DELETED
File without changes