@@ -8,7 +8,6 @@ import { ETransferType } from '../types/wallet';
8
8
import { blocktankInfoSelector } from './blocktank' ;
9
9
import {
10
10
channelsSizeSelector ,
11
- claimableBalanceSelector ,
12
11
lightningBalanceSelector ,
13
12
pendingPaymentsSelector ,
14
13
} from './lightning' ;
@@ -41,19 +40,22 @@ export const balanceSelector = createSelector(
41
40
onChainBalanceSelector ,
42
41
pendingTransfersSelector ,
43
42
pendingPaymentsSelector ,
44
- claimableBalanceSelector ,
45
43
newChannelsNotificationsSelector ,
46
44
lightningBalanceSelector ,
47
45
] ,
48
46
(
49
47
onchainBalance ,
50
48
pendingTransfers ,
51
49
pendingPayments ,
52
- claimableBalance ,
53
50
newChannels ,
54
51
lnBalance ,
55
52
) : TBalance => {
56
- const { lightningBalance, spendingBalance, reserveBalance } = lnBalance ;
53
+ const {
54
+ lightningBalance,
55
+ spendingBalance,
56
+ reserveBalance,
57
+ claimableBalance,
58
+ } = lnBalance ;
57
59
const spendableBalance = onchainBalance + spendingBalance ;
58
60
const pendingPaymentsBalance = pendingPayments . reduce (
59
61
( acc , payment ) => acc + payment . amount ,
@@ -128,7 +130,8 @@ export const lnSetupSelector = createSelector(
128
130
( _ , spending ) : number => spending ,
129
131
] ,
130
132
( blocktankInfo , balance , channelsSize , spending : number ) : TLnSetup => {
131
- const { totalBalance, onchainBalance, lightningBalance } = balance ;
133
+ const { onchainBalance, lightningBalance } = balance ;
134
+ const totalBalance = onchainBalance + lightningBalance ;
132
135
const clientBalance = spending - lightningBalance ;
133
136
const { minChannelSizeSat, maxChannelSizeSat } = blocktankInfo . options ;
134
137
// Because BT /info minChannelSizeSat constantly changes depending on network fees,
0 commit comments