@exodus/ethereum-lib 3.3.13 → 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.
|
|
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": "
|
|
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
|
+
}
|
package/src/index.js
CHANGED
package/src/selectors/index.js
CHANGED
|
@@ -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
|
+
}
|