Skip to content
Permalink
Browse files

feat(ui): add activity metric

resolve #1973
  • Loading branch information...
korhaliv authored and mrfelton committed Apr 18, 2019
1 parent 32d6a2f commit c31c54d35aeccb784c0cdc4b55cb47f056cfe31e
Showing with 10 additions and 2 deletions.
  1. +1 −1 renderer/components/Channels/ChannelCardList.js
  2. +9 −1 renderer/components/Channels/ChannelData.js
@@ -20,7 +20,7 @@ const ChannelCardList = ({
}) => {
const ROW_PADDING_BOTTOM = 3
// current row height + margin bottom
const ROW_HEIGHT = 396 + baseSpace[ROW_PADDING_BOTTOM]
const ROW_HEIGHT = 446 + baseSpace[ROW_PADDING_BOTTOM]
const renderRow = rowProps => {
const { columnIndex, rowIndex, key, style } = rowProps
const index = rowIndex * 2 + columnIndex
@@ -22,6 +22,7 @@ const ChannelData = ({ channel, currencyName, networkInfo, viewMode, ...rest })
total_satoshis_sent,
total_satoshis_received,
csv_delay,
activity,
num_updates,
fundingTxTimestamp,
} = channel
@@ -77,6 +78,12 @@ const ChannelData = ({ channel, currencyName, networkInfo, viewMode, ...rest })
value: <Text>{num_updates}</Text>,
}),

activity: () => ({
label: <FormattedMessage {...messages.channel_activity} />,
body: <FormattedMessage {...messages.num_updates_description} />,
value: `${Math.round(activity * 100)}%`,
}),

csv_delay: () => ({
label: <FormattedMessage {...messages.csv_delay_label} />,
body: <FormattedMessage {...messages.csv_delay_description} />,
@@ -135,13 +142,14 @@ const ChannelData = ({ channel, currencyName, networkInfo, viewMode, ...rest })
// Determine which of the properties we will display based on the active view mode.
const candidateProps =
viewMode === CHANNEL_DATA_VIEW_MODE_BASIC
? ['channel_point', 'num_updates', 'csv_delay']
? ['channel_point', 'num_updates', 'csv_delay', 'activity']
: [
'channel_point',
'fundingTxTimestamp',
'closing_txid',
'num_updates',
'csv_delay',
'activity',
'total_satoshis_sent',
'total_satoshis_received',
'commit_fee',

0 comments on commit c31c54d

Please sign in to comment.
You can’t perform that action at this time.