-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1523 from oasisprotocol/mz/consensusTxShortcut
Use runtimes tables to render Consensus tx lists
- Loading branch information
Showing
9 changed files
with
122 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Use runtimes tables to render Consensus tx lists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { FC } from 'react' | ||
import { useTranslation } from 'react-i18next' | ||
import { Transaction } from '../../../oasis-nexus/api' | ||
import { RoundedBalance } from '../RoundedBalance' | ||
|
||
type ConsensusAmountProps = { | ||
transaction: Transaction | ||
} | ||
|
||
export const ConsensusAmount: FC<ConsensusAmountProps> = ({ transaction }) => { | ||
const { t } = useTranslation() | ||
|
||
if (transaction?.amount) { | ||
return <RoundedBalance value={transaction.amount} ticker={transaction.ticker} /> | ||
} | ||
|
||
if (transaction?.body?.shares) { | ||
return <RoundedBalance compactLargeNumbers value={transaction.body.shares} ticker={t('common.shares')} /> | ||
} | ||
|
||
return null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { FC } from 'react' | ||
import Box from '@mui/material/Box' | ||
import { styled } from '@mui/material/styles' | ||
import ArrowForwardIcon from '@mui/icons-material/ArrowForward' | ||
import { COLORS } from '../../../styles/theme/colors' | ||
|
||
const iconSize = '28px' | ||
export const StyledCircle = styled(Box)(({ theme }) => ({ | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
width: iconSize, | ||
height: iconSize, | ||
color: COLORS.eucalyptus, | ||
backgroundColor: COLORS.lightGreen, | ||
borderRadius: iconSize, | ||
marginLeft: theme.spacing(3), | ||
marginRight: `-${theme.spacing(4)}`, | ||
})) | ||
|
||
export const TransferIcon: FC = () => { | ||
return ( | ||
<StyledCircle> | ||
<ArrowForwardIcon fontSize="inherit" /> | ||
</StyledCircle> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters