Unwrap active when field available (#7176)
* Unwrap active when field available * || instead of ?? (less compile magic)
This commit is contained in:
parent
2d5089abfd
commit
a3a57b9508
@ -132,9 +132,10 @@ function Account ({ account: { address, meta }, className = '', delegation, filt
|
||||
useEffect((): void => {
|
||||
if (balancesAll) {
|
||||
setBalance(address, {
|
||||
bonded: stakingInfo?.stakingLedger.active.unwrap() ?? BN_ZERO,
|
||||
// some chains don't have "active" in the Ledger
|
||||
bonded: stakingInfo?.stakingLedger.active?.unwrap() || BN_ZERO,
|
||||
locked: balancesAll.lockedBalance,
|
||||
redeemable: stakingInfo?.redeemable ?? BN_ZERO,
|
||||
redeemable: stakingInfo?.redeemable || BN_ZERO,
|
||||
total: balancesAll.freeBalance.add(balancesAll.reservedBalance),
|
||||
transferrable: balancesAll.availableBalance,
|
||||
unbonding: calcUnbonding(stakingInfo)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user