@exodus/ethereum-lib 3.3.12 → 3.3.14

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": "3.3.12",
3
+ "version": "3.3.14",
4
4
  "description": "Ethereum Library",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -41,5 +41,5 @@
41
41
  "ms": "^2.1.1",
42
42
  "reselect": "~3.0.1"
43
43
  },
44
- "gitHead": "516bfb4ee826b72710dd20a9c16ea21346fffeff"
44
+ "gitHead": "b20ef440f0755862178fcb08713ae10cfb4d0c21"
45
45
  }
@@ -0,0 +1,11 @@
1
+ import { get } from 'lodash'
2
+
3
+ export const getPolygonBalances = ({ liquidBalance, accountState }) => {
4
+ const delegatedBalance = get(accountState, 'staking.polygon.delegatedBalance')
5
+ const unddelegatedBalance = get(accountState, 'staking.polygon.unclaimedUndelegatedBalance')
6
+ const totalBalance = liquidBalance.add(delegatedBalance).add(unddelegatedBalance)
7
+ return {
8
+ balance: totalBalance,
9
+ liquidBalance,
10
+ }
11
+ }
@@ -1,5 +1,5 @@
1
1
  import { FeeData } from '@exodus/asset-lib'
2
- import { asset } from '@exodus/flare-meta'
2
+ import { asset } from '@exodus/aurora-meta'
3
3
 
4
4
  export default new FeeData({
5
5
  config: {
package/src/index.js CHANGED
@@ -4,6 +4,7 @@ import * as feeData from './fee-data'
4
4
 
5
5
  export { createContract, ABI, feeData }
6
6
 
7
+ export * from './balances'
7
8
  export * from './encode'
8
9
  export * from './unsigned-tx'
9
10
  export * from './utils'
@@ -5,4 +5,5 @@ export {
5
5
  getAssetPendingNonExchangeTxs,
6
6
  } from './get-can-accelerate-tx-factory'
7
7
 
8
+ export { getPolygonBalances } from './polygon-balance'
8
9
  export { default as getIsEnoughBalanceToAccelerateSelectorFactory } from './get-is-enough-balance-to-accelerate-factory'
@@ -0,0 +1,11 @@
1
+ import { get } from 'lodash'
2
+
3
+ export const getPolygonBalances = ({ liquidBalance, accountState }) => {
4
+ const delegatedBalance = get(accountState, 'staking.polygon.delegatedBalance')
5
+ const unddelegatedBalance = get(accountState, 'staking.polygon.unclaimedUndelegatedBalance')
6
+ const totalBalance = liquidBalance.add(delegatedBalance).add(unddelegatedBalance)
7
+ return {
8
+ balance: totalBalance,
9
+ liquidBalance,
10
+ }
11
+ }