refactor: use proft calculated in GraphQL resolver
This commit is contained in:
parent
e7ca33c8a4
commit
ce8295e54a
1 changed files with 1 additions and 6 deletions
|
|
@ -4,12 +4,7 @@ import React, { useEffect, useRef, useCallback } from 'react'
|
|||
|
||||
import { backgroundColor, zircon, primaryColor } from 'src/styling/variables'
|
||||
|
||||
const transactionProfit = tx => {
|
||||
const fixedFee = tx.fixedFee ? Number.parseFloat(tx.fixedFee) : 0
|
||||
const commission =
|
||||
Number.parseFloat(tx.commissionPercentage) * Number.parseFloat(tx.fiat)
|
||||
return commission + fixedFee
|
||||
}
|
||||
const transactionProfit = R.prop('profit')
|
||||
|
||||
const mockPoint = (tx, offsetMs, profit) => {
|
||||
const date = new Date(new Date(tx.created).getTime() + offsetMs).toISOString()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue