@exodus/ethereum-api 8.33.6 → 8.33.7

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 CHANGED
@@ -3,6 +3,16 @@
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
+ ## [8.33.7](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.33.6...@exodus/ethereum-api@8.33.7) (2025-04-03)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix: populate the activeStakedBalance for matic and polygon staking (#5374)
13
+
14
+
15
+
6
16
  ## [8.33.6](https://github.com/ExodusMovement/assets/compare/@exodus/ethereum-api@8.33.5...@exodus/ethereum-api@8.33.6) (2025-04-01)
7
17
 
8
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "8.33.6",
3
+ "version": "8.33.7",
4
4
  "description": "Transaction monitors, fee monitors, RPC with the blockchain node, and other networking code for Ethereum and EVM-based blockchains",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -64,5 +64,5 @@
64
64
  "type": "git",
65
65
  "url": "git+https://github.com/ExodusMovement/assets.git"
66
66
  },
67
- "gitHead": "323d88c01416cafbc90022d336d9062315f9322b"
67
+ "gitHead": "c181bb6d727d45fe17b31d1cf1b70eeb34fb7fd4"
68
68
  }
@@ -8,13 +8,13 @@ import { isRpcBalanceAsset } from '@exodus/ethereum-lib'
8
8
  import assert from 'minimalistic-assert'
9
9
 
10
10
  const getStaked = ({ accountState, asset }) => {
11
- return accountState?.staking?.[asset.name]?.delegatedBalance || asset.currency.ZERO
11
+ return accountState?.staking?.[asset.name]?.activeStakedBalance || asset.currency.ZERO
12
12
  }
13
13
 
14
14
  const getStaking = ({ accountState, asset }) => {
15
- const activeStakedBalance =
16
- accountState?.staking?.[asset.name]?.activeStakedBalance || asset.currency.ZERO
17
- return getStaked({ accountState, asset }).sub(activeStakedBalance)
15
+ return (accountState?.staking?.[asset.name]?.pendingBalance || asset.currency.ZERO).add(
16
+ accountState?.staking?.[asset.name]?.pendingDepositedBalance || asset.currency.ZERO
17
+ )
18
18
  }
19
19
 
20
20
  const getUnclaimedUndelegatedBalance = ({ accountState, asset }) => {
@@ -441,6 +441,7 @@ export async function getPolygonStakingInfo({ address, asset, server }) {
441
441
  unbondNonce,
442
442
  isDelegating,
443
443
  delegatedBalance,
444
+ activeStakedBalance: delegatedBalance,
444
445
  minRewardsToWithdraw,
445
446
  minDelegateAmount,
446
447
  ...unclaimedUndelegatedInfo,