mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* update styles of tx details * common color for text separator * remove bold fontWeight from some details items * address, block, token, pool, user ops details pages * refactor chain-specific views * unify grid column template for detailed views * remove TODO * update margins for text separator * update screenshots * update margin between icon and text for mobile * rename prop * update layout of decoded input data * update screenshots * fix tac operation and zilliqa quorum snippets
63 lines
2.0 KiB
TypeScript
63 lines
2.0 KiB
TypeScript
import { Box, Text } from '@chakra-ui/react';
|
|
import React from 'react';
|
|
|
|
import type { Transaction } from 'types/api/transaction';
|
|
|
|
import * as DetailedInfo from 'ui/shared/DetailedInfo/DetailedInfo';
|
|
import TextSeparator from 'ui/shared/TextSeparator';
|
|
|
|
type Props = Pick<Transaction, 'nonce' | 'type' | 'position'> & { queueIndex?: number };
|
|
|
|
const TxDetailsOther = ({ nonce, type, position, queueIndex }: Props) => {
|
|
return (
|
|
<>
|
|
<DetailedInfo.ItemLabel
|
|
hint="Other data related to this transaction"
|
|
>
|
|
Other
|
|
</DetailedInfo.ItemLabel>
|
|
<DetailedInfo.ItemValue multiRow>
|
|
{
|
|
[
|
|
typeof type === 'number' && (
|
|
<Box key="type">
|
|
<span>Txn type: </span>
|
|
<span>{ type }</span>
|
|
{ type === 2 && <Text as="span" ml={ 1 } color="text.secondary">(EIP-1559)</Text> }
|
|
{ type === 3 && <Text as="span" ml={ 1 } color="text.secondary">(EIP-4844)</Text> }
|
|
{ type === 4 && <Text as="span" ml={ 1 } color="text.secondary">(EIP-7702)</Text> }
|
|
</Box>
|
|
),
|
|
queueIndex !== undefined ? (
|
|
<Box key="queueIndex">
|
|
<span>Queue index: </span>
|
|
<span>{ queueIndex }</span>
|
|
</Box>
|
|
) : (
|
|
<Box key="nonce">
|
|
<span>Nonce: </span>
|
|
<span>{ nonce }</span>
|
|
</Box>
|
|
),
|
|
position !== null && position !== undefined && (
|
|
<Box key="position">
|
|
<span>Position: </span>
|
|
<span>{ position }</span>
|
|
</Box>
|
|
),
|
|
]
|
|
.filter(Boolean)
|
|
.map((item, index) => (
|
|
<React.Fragment key={ index }>
|
|
{ index !== 0 && <TextSeparator/> }
|
|
{ item }
|
|
</React.Fragment>
|
|
))
|
|
}
|
|
</DetailedInfo.ItemValue>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default TxDetailsOther;
|