Merge pull request #1447 from chaotixkilla/fix-analytics-commission-value
Fix commission value in analytics screen
This commit is contained in:
commit
3d8d0d4f9c
1 changed files with 3 additions and 12 deletions
|
|
@ -83,6 +83,7 @@ const GET_TRANSACTIONS = gql`
|
||||||
cryptoCode
|
cryptoCode
|
||||||
toAddress
|
toAddress
|
||||||
created
|
created
|
||||||
|
profit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
@ -237,18 +238,8 @@ const Analytics = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const commissions = {
|
const commissions = {
|
||||||
current: R.sum(
|
current: R.sum(R.map(d => d.profit, filteredData(period.code).current)),
|
||||||
R.map(
|
previous: R.sum(R.map(d => d.profit, filteredData(period.code).previous))
|
||||||
d => d.fiat * d.commissionPercentage,
|
|
||||||
filteredData(period.code).current
|
|
||||||
)
|
|
||||||
),
|
|
||||||
previous: R.sum(
|
|
||||||
R.map(
|
|
||||||
d => d.fiat * d.commissionPercentage,
|
|
||||||
filteredData(period.code).previous
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleRepresentationChange = newRepresentation => {
|
const handleRepresentationChange = newRepresentation => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue