Skip to content

Commit

Permalink
Merge pull request #830 from bitfinexcom/staging
Browse files Browse the repository at this point in the history
Release version to master
  • Loading branch information
prdn authored Jul 2, 2024
2 parents b14ccb9 + f68de33 commit 3001f10
Show file tree
Hide file tree
Showing 44 changed files with 656 additions and 1,409 deletions.
22 changes: 13 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bfx-report-ui",
"version": "2.42.0",
"version": "2.42.1",
"description": "Report page to overview the user actions in Bitfinex and download related csv files",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/components/AffiliatesEarnings/AffiliatesEarnings.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
toggleSymbol,
clearAllSymbols,
} from 'state/utils'
import getColumns from 'components/Ledgers/Ledgers.columns'
import { getColumns } from 'components/Ledgers/Ledgers.columns'

import AffiliatesLink from './AffiliatesEarnings.link'

Expand Down
120 changes: 19 additions & 101 deletions src/components/Derivatives/Derivatives.columns.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import React from 'react'
import { Cell } from '@blueprintjs/table'

import { formatAmount, fixedFloat } from 'ui/utils'
import { getCellState, getColumnWidth, getTooltipContent } from 'utils/columns'
import { getCell, getCellState, getColumnWidth } from 'utils/columns'

export const getColumns = ({
t,
Expand All @@ -19,15 +16,9 @@ export const getColumns = ({
className: 'align-left',
width: getColumnWidth('pair', columnsWidth),
renderer: (rowIndex) => {
if (isLoading || isNoData) {
return getCellState(isLoading, isNoData)
}
if (isLoading || isNoData) return getCellState(isLoading, isNoData)
const { pair } = filteredData[rowIndex]
return (
<Cell tooltip={getTooltipContent(pair, t)}>
{pair}
</Cell>
)
return getCell(pair, t)
},
copyText: rowIndex => filteredData[rowIndex].pair,
},
Expand All @@ -36,19 +27,9 @@ export const getColumns = ({
name: 'column.priceDeriv',
width: getColumnWidth('price', columnsWidth),
renderer: (rowIndex) => {
if (isLoading || isNoData) {
return getCellState(isLoading, isNoData)
}
if (isLoading || isNoData) return getCellState(isLoading, isNoData)
const { price } = filteredData[rowIndex]
const fixedPrice = fixedFloat(price)
return (
<Cell
className='bitfinex-text-align-right'
tooltip={getTooltipContent(fixedPrice, t)}
>
{fixedPrice}
</Cell>
)
return getCell(fixedFloat(price), t)
},
isNumericValue: true,
copyText: rowIndex => fixedFloat(filteredData[rowIndex].price),
Expand All @@ -58,19 +39,9 @@ export const getColumns = ({
name: 'column.priceSpot',
width: getColumnWidth('priceSpot', columnsWidth),
renderer: (rowIndex) => {
if (isLoading || isNoData) {
return getCellState(isLoading, isNoData)
}
if (isLoading || isNoData) return getCellState(isLoading, isNoData)
const { priceSpot } = filteredData[rowIndex]
const fixedPrice = fixedFloat(priceSpot)
return (
<Cell
className='bitfinex-text-align-right'
tooltip={getTooltipContent(fixedPrice, t)}
>
{fixedPrice}
</Cell>
)
return getCell(fixedFloat(priceSpot), t)
},
isNumericValue: true,
copyText: rowIndex => fixedFloat(filteredData[rowIndex].priceSpot),
Expand All @@ -80,19 +51,9 @@ export const getColumns = ({
name: 'column.fundBalance',
width: getColumnWidth('fundBal', columnsWidth),
renderer: (rowIndex) => {
if (isLoading || isNoData) {
return getCellState(isLoading, isNoData)
}
if (isLoading || isNoData) return getCellState(isLoading, isNoData)
const { fundBal } = filteredData[rowIndex]
const fixedBalance = fixedFloat(fundBal)
return (
<Cell
className='bitfinex-text-align-right'
tooltip={getTooltipContent(fixedBalance, t)}
>
{fixedBalance}
</Cell>
)
return getCell(fixedFloat(fundBal), t)
},
isNumericValue: true,
copyText: rowIndex => fixedFloat(filteredData[rowIndex].fundBal),
Expand All @@ -102,19 +63,9 @@ export const getColumns = ({
name: 'column.fundingAccrued',
width: getColumnWidth('fundingAccrued', columnsWidth),
renderer: (rowIndex) => {
if (isLoading || isNoData) {
return getCellState(isLoading, isNoData)
}
if (isLoading || isNoData) return getCellState(isLoading, isNoData)
const { fundingAccrued } = filteredData[rowIndex]
const fixedFunding = fixedFloat(fundingAccrued)
return (
<Cell
className='bitfinex-text-align-right'
tooltip={getTooltipContent(fixedFunding, t)}
>
{formatAmount(fundingAccrued)}
</Cell>
)
return getCell(formatAmount(fundingAccrued), t, fixedFloat(fundingAccrued))
},
isNumericValue: true,
copyText: rowIndex => fixedFloat(filteredData[rowIndex].fundingAccrued),
Expand All @@ -124,18 +75,9 @@ export const getColumns = ({
name: 'column.fundingStep',
width: getColumnWidth('fundingStep', columnsWidth),
renderer: (rowIndex) => {
if (isLoading || isNoData) {
return getCellState(isLoading, isNoData)
}
if (isLoading || isNoData) return getCellState(isLoading, isNoData)
const { fundingStep } = filteredData[rowIndex]
return (
<Cell
className='bitfinex-text-align-right'
tooltip={getTooltipContent(fundingStep, t)}
>
{fundingStep}
</Cell>
)
return getCell(fundingStep, t)
},
copyText: rowIndex => filteredData[rowIndex].fundingStep,
},
Expand All @@ -145,15 +87,9 @@ export const getColumns = ({
nameStr: `${t('column.updated')} (${timeOffset})`,
width: getColumnWidth('timestamp', columnsWidth),
renderer: (rowIndex) => {
if (isLoading || isNoData) {
return getCellState(isLoading, isNoData)
}
if (isLoading || isNoData) return getCellState(isLoading, isNoData)
const timestamp = getFullTime(filteredData[rowIndex].timestamp)
return (
<Cell tooltip={getTooltipContent(timestamp, t)}>
{timestamp}
</Cell>
)
return getCell(timestamp, t)
},
copyText: rowIndex => getFullTime(filteredData[rowIndex].timestamp),
},
Expand All @@ -162,18 +98,9 @@ export const getColumns = ({
name: 'column.clampMin',
width: getColumnWidth('clampMin', columnsWidth),
renderer: (rowIndex) => {
if (isLoading || isNoData) {
return getCellState(isLoading, isNoData)
}
if (isLoading || isNoData) return getCellState(isLoading, isNoData)
const { clampMin } = filteredData[rowIndex]
return (
<Cell
className='bitfinex-text-align-right'
tooltip={getTooltipContent(clampMin, t)}
>
{clampMin}
</Cell>
)
return getCell(clampMin, t)
},
copyText: rowIndex => filteredData[rowIndex].clampMin,
},
Expand All @@ -182,18 +109,9 @@ export const getColumns = ({
name: 'column.clampMax',
width: getColumnWidth('clampMax', columnsWidth),
renderer: (rowIndex) => {
if (isLoading || isNoData) {
return getCellState(isLoading, isNoData)
}
if (isLoading || isNoData) return getCellState(isLoading, isNoData)
const { clampMax } = filteredData[rowIndex]
return (
<Cell
className='bitfinex-text-align-right'
tooltip={getTooltipContent(clampMax, t)}
>
{clampMax}
</Cell>
)
return getCell(clampMax, t)
},
copyText: rowIndex => filteredData[rowIndex].clampMax,
},
Expand Down
Loading

0 comments on commit 3001f10

Please sign in to comment.