Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 47d1aff

Browse files
committed
Add Limbo Balance to Wallet
1 parent fabfc69 commit 47d1aff

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

packages/lightning-core/accounts/Wallet.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,15 @@ export const Wallet = ({ pubkey, balances }) => {
7070
label: 'In Channels',
7171
amount: balances.channel,
7272
},
73-
// {
74-
// label: 'Frozen',
75-
// amount: '2,510',
76-
// },
7773
]
7874

75+
if (balances.limbo) {
76+
breakdown.push({
77+
label: 'In Limbo',
78+
amount: balances.limbo,
79+
})
80+
}
81+
7982
return (
8083
<div style={ styles.bg }>
8184
<div style={ styles.title }>Your Wallet</div>

packages/lightning-core/accounts/reducer.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ export default (state = initialState, action) => {
4646
return {
4747
...state,
4848
channels: _.uniqBy([...action.channels, ...state.channels], 'channelPoint'),
49+
balances: {
50+
...state.balances,
51+
...(action.limboBalance !== undefined ? { limbo: action.limboBalance } : {}),
52+
},
4953
loadingChannels: false,
5054
}
5155
case START_CLOSING_CHANNEL:
@@ -161,6 +165,7 @@ export const actions = {
161165
// status: 'pending-force-closing',
162166
// },
163167
],
168+
limboBalance: parseInt(data.total_limbo_balance, 0),
164169
}
165170
},
166171
},

0 commit comments

Comments
 (0)