Skip to content

Commit

Permalink
Merge pull request #775 from Conflux-Chain/s38
Browse files Browse the repository at this point in the history
feat: update daily CFX transfer chart of cross space
  • Loading branch information
0x74616e67 authored Jun 6, 2022
2 parents 9881d03 + 790b6ed commit 753a93d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/app/containers/Charts/crossSpace/DailyCFXTransfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from 'app/components/Charts/StockChartTemplate';
import { OPEN_API_URLS } from 'utils/constants';
import { Wrapper } from './Wrapper';
import BigNumber from 'bignumber.js';

export function DailyCFXTransfer({ preview = false }: ChildProps) {
const { t } = useTranslation();
Expand All @@ -25,8 +26,8 @@ export function DailyCFXTransfer({ preview = false }: ChildProps) {

data?.list?.map((d, i) => {
const t = dayjs.utc(d.day).valueOf();
data1.push([t, Number(d.v)]);
data2.push([t, Number(d.v)]);
data1.push([t, Number(new BigNumber(d.DailyCfxToEVM).toFixed(2))]);
data2.push([t, Number(new BigNumber(d.DailyCfxFromEVM).toFixed(2))]);
});

return [data1, data2];
Expand Down Expand Up @@ -54,7 +55,6 @@ export function DailyCFXTransfer({ preview = false }: ChildProps) {
},
tooltip: {
shared: true,
valueDecimals: 2,
},
series: [
{
Expand Down
7 changes: 3 additions & 4 deletions src/app/containers/Charts/pos/DailyRewardRank.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ export function DailyRewardRank({ preview = false }: ChildProps) {
headerFormat: '',
pointFormat: `${t(
translations.highcharts.pos.dailyRewardRank.PoSAddress,
)}: <b>{point.info.PoSAddress}</b>
<br/>${t(
translations.highcharts.pos.dailyRewardRank.PoWAddress,
)}: <b>{point.info.PoWAddress}</b>
)}: <b>{point.info.PoSAddress}</b><br/>${t(
translations.highcharts.pos.dailyRewardRank.PoWAddress,
)}: <b>{point.info.PoWAddress}</b>
<br/>${t(
translations.highcharts.pos.dailyRewardRank.reward,
)}: <b>{point.y:.2f}</b>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,4 @@ OPEN_API_URLS.PoSDailyDeposit = '/stat/pos-daily-deposit-withdraw';
OPEN_API_URLS.PoSDailyParticipationRate = '/stat/pos-daily-participation-rate';

// Cross Space
OPEN_API_URLS.CrossSpaceDailyCFXTransfer = '/stat/cross-space-cfx-to-evm';
OPEN_API_URLS.CrossSpaceDailyCFXTransfer = '/stat/cross-space-cfx';

0 comments on commit 753a93d

Please sign in to comment.