Skip to content

Commit

Permalink
Merge branch 'develop' into chore/issue-334-calc-byron-slots-per-epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikGuzei committed Jul 31, 2020
2 parents 6d61d4d + e1b9b61 commit 320adf7
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
7 changes: 3 additions & 4 deletions source/features/blocks/api/transformers.ts
Expand Up @@ -51,18 +51,17 @@ export const blockDetailsTransformer = (
});

function formatCreatedBy(value: IBlockOverview['createdBy']): string {

switch (value) {
case 'Genesis slot leader':
return 'Genesis';
case 'Epoch boundary slot leader':
return 'EBB';
default:
const selection = value.split('-');
const selection = value.split('-');
if (!Array.isArray(selection)) {
return ''
return '';
}
return selection[1].substring(0,7)
return selection[1].substring(0, 7);
}
}

Expand Down
4 changes: 2 additions & 2 deletions source/features/blocks/ui/BlockList.tsx
@@ -1,5 +1,5 @@
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc'
import utc from 'dayjs/plugin/utc';
import { isNumber } from 'lodash';
import { observer } from 'mobx-react-lite';
import React, { FC } from 'react';
Expand All @@ -11,7 +11,7 @@ import { getBlockRoute } from '../helpers';
import { IBlockOverview } from '../types';
import styles from './BlockList.module.scss';

dayjs.extend(utc)
dayjs.extend(utc);

export interface IBlockListProps {
ignoreLinksToEpoch?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions source/features/blocks/ui/BlockSummary.tsx
@@ -1,5 +1,5 @@
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc'
import utc from 'dayjs/plugin/utc';
import { isNumber } from 'lodash';
import { observer } from 'mobx-react-lite';
import DividerWithTitle from '../../../widgets/divider-with-title/DividerWithTitle';
Expand All @@ -13,7 +13,7 @@ import { BLOCK_SEARCH_RESULT_PATH } from '../config';
import { IBlockDetailed } from '../types';
import styles from './BlockSummary.module.scss';

dayjs.extend(utc)
dayjs.extend(utc);

export type BlockSummaryProps = {
navigation?: NavigationActions;
Expand Down
4 changes: 2 additions & 2 deletions source/features/epochs/ui/EpochList.tsx
@@ -1,5 +1,5 @@
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc'
import utc from 'dayjs/plugin/utc';
import { observer } from 'mobx-react-lite';
import React, { FC } from 'react';
import CircularProgress, {
Expand All @@ -12,7 +12,7 @@ import { getEpochRoute } from '../helpers';
import { IEpochOverview } from '../types';
import styles from './EpochList.module.scss';

dayjs.extend(utc)
dayjs.extend(utc);

export interface IEpochListProps {
currentEpoch: number;
Expand Down
4 changes: 2 additions & 2 deletions source/features/epochs/ui/EpochSummary.tsx
@@ -1,5 +1,5 @@
import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc'
import utc from 'dayjs/plugin/utc';
import { observer } from 'mobx-react-lite';
import CircularProgress, {
CircularProgressSize,
Expand All @@ -9,7 +9,7 @@ import { useI18nFeature } from '../../i18n/context';
import { IEpochOverview } from '../types';
import styles from './EpochSummary.module.scss';

dayjs.extend(utc)
dayjs.extend(utc);

export interface IEpochSummaryProps {
title: string;
Expand Down
@@ -1,7 +1,7 @@
import classnames from 'classnames';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import utc from 'dayjs/plugin/utc'
import utc from 'dayjs/plugin/utc';
import React, { FC, useCallback, useEffect, useRef } from 'react';
import { getColorFromRange } from '../../../lib/colors';
import { useI18nFeature } from '../../i18n/context';
Expand Down
Expand Up @@ -99,7 +99,7 @@ export interface ITransactionInfoProps extends ITransactionDetails {
const TransactionInfo = (props: ITransactionInfoProps) => {
const { translate } = useI18nFeature().store;
const isMobile = window.innerWidth <= 768;
const includedAtUtc = dayjs.utc(props.includedAt)
const includedAtUtc = dayjs.utc(props.includedAt);
const onEpochNumberClick = (e: ITransactionDetails['block']['epoch']) => {
if ((!e && e !== 0) || e === '-') {
return;
Expand Down

0 comments on commit 320adf7

Please sign in to comment.