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

Commit ff80fc8

Browse files
committed
Display on-chain balance in channels summary on desktop
1 parent 7a85078 commit ff80fc8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/view/channel.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { ResizeableSpinner } from '../component/spinner';
1212
import { H1Text, CopyText } from '../component/text';
1313
import Text from '../component/text';
1414
import PlusIcon from '../../src/asset/icon/plus';
15+
import BitcoinIcon from '../../src/asset/icon/bitcoin';
1516
import LightningBoltGradientIcon from '../../src/asset/icon/lightning-bolt-gradient';
1617
import { color, font } from '../component/style';
1718

@@ -96,6 +97,7 @@ const ChannelList = ({ store, channel }) => {
9697
channelBalanceInactiveLabel,
9798
channelBalancePendingLabel,
9899
channelBalanceClosingLabel,
100+
balanceLabel,
99101
unitLabel,
100102
} = store;
101103
return (
@@ -105,6 +107,7 @@ const ChannelList = ({ store, channel }) => {
105107
channelBalanceInactiveLabel={channelBalanceInactiveLabel}
106108
channelBalancePendingLabel={channelBalancePendingLabel}
107109
channelBalanceClosingLabel={channelBalanceClosingLabel}
110+
balanceLabel={balanceLabel}
108111
unitLabel={unitLabel}
109112
/>
110113
<ListContent>
@@ -164,6 +167,7 @@ const ChannelSummary = ({
164167
channelBalanceInactiveLabel,
165168
channelBalancePendingLabel,
166169
channelBalanceClosingLabel,
170+
balanceLabel,
167171
unitLabel,
168172
}) => (
169173
<View style={summaryStyles.wrapper}>
@@ -195,6 +199,15 @@ const ChannelSummary = ({
195199
{channelBalanceClosingLabel} {unitLabel}
196200
</Text>
197201
</View>
202+
<View style={summaryStyles.box}>
203+
<View style={summaryStyles.alert}>
204+
<BitcoinIcon height={170 * 0.06} width={135 * 0.06} />
205+
</View>
206+
<Text style={summaryStyles.txt}>On-chain</Text>
207+
<Text style={[summaryStyles.txt, summaryStyles.total]}>
208+
{balanceLabel} {unitLabel}
209+
</Text>
210+
</View>
198211
</View>
199212
);
200213

@@ -203,6 +216,7 @@ ChannelSummary.propTypes = {
203216
channelBalanceInactiveLabel: PropTypes.string.isRequired,
204217
channelBalancePendingLabel: PropTypes.string.isRequired,
205218
channelBalanceClosingLabel: PropTypes.string.isRequired,
219+
balanceLabel: PropTypes.string.isRequired,
206220
unitLabel: PropTypes.string,
207221
};
208222

0 commit comments

Comments
 (0)