Browse Source

Translations on ConfirmationsCheck

master
meriadec 7 years ago
parent
commit
79ecab0287
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 10
      src/components/TransactionsList/ConfirmationCheck.js
  2. 6
      src/components/TransactionsList/index.js
  3. 2
      static/i18n/en/transactionsList.yml

10
src/components/TransactionsList/ConfirmationCheck.js

@ -5,6 +5,8 @@ import styled from 'styled-components'
import { rgba } from 'styles/helpers'
import type { T } from 'types/common'
import Box from 'components/base/Box'
import Tooltip from 'components/base/Tooltip'
import IconCheck from 'icons/Check'
@ -24,13 +26,19 @@ const Container = styled(Box).attrs({
const ConfirmationCheck = ({
confirmations,
minConfirmations,
t,
}: {
confirmations: number,
minConfirmations: number,
t: T,
}) => {
const isConfirmed = confirmations >= minConfirmations
return (
<Tooltip render={() => (isConfirmed ? 'Confirmed' : 'Not confirmed')}>
<Tooltip
render={() =>
isConfirmed ? t('transactionsList:confirmed') : t('transactionsList:notConfirmed')
}
>
<Container isConfirmed={isConfirmed}>
{isConfirmed ? <IconCheck width={12} /> : <IconClock width={12} />}
</Container>

6
src/components/TransactionsList/index.js

@ -175,7 +175,11 @@ const Transaction = ({
/>
</Cell>
<Cell size={CONFIRMATION_COL_SIZE} px={0} align="center" justify="flex-start">
<ConfirmationCheck minConfirmations={minConfirmations} confirmations={tx.confirmations} />
<ConfirmationCheck
minConfirmations={minConfirmations}
confirmations={tx.confirmations}
t={t}
/>
</Cell>
</TransactionRaw>
)

2
static/i18n/en/transactionsList.yml

@ -5,3 +5,5 @@ amount: Amount
from: From
to: To
showMore: Show more
confirmed: Confirmed
notConfirmed: Not confirmed

Loading…
Cancel
Save