Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix(ui): correctly calcualte chan activity
Browse files Browse the repository at this point in the history
  • Loading branch information
korhaliv authored and mrfelton committed Dec 16, 2019
1 parent 095e4a6 commit 1330a4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion renderer/components/Channels/ChannelData.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const ChannelData = ({ channel, cryptoUnitName, intl, networkInfo, viewMode, ...
activity: () => ({
label: <FormattedMessage {...messages.channel_activity} />,
body: <FormattedMessage {...messages.channel_activity_description} />,
value: `${activity * 100}%`,
value: `${activity}%`,
}),

csv_delay: () => ({
Expand Down
4 changes: 2 additions & 2 deletions renderer/reducers/channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ const decorateChannel = (channelObj, nodes, closingChannelIds, loadingChannelPub
// Calculate capacity as flow / capacity.
return flow
.dividedBy(CoinBig(capacity))
.decimalPlaces(2)
.toNumber()
.multipliedBy(100)
.toFixed(0)
}

return 0
Expand Down

0 comments on commit 1330a4b

Please sign in to comment.