Commit ccbfdff1 authored by isstuev's avatar isstuev

design fixes

parent 97c1a9f3
...@@ -96,7 +96,7 @@ const TransactionPageContent = () => { ...@@ -96,7 +96,7 @@ const TransactionPageContent = () => {
const titleSecondRow = ( const titleSecondRow = (
<Box display={{ base: 'block', lg: 'flex' }} alignItems="center" w="100%"> <Box display={{ base: 'block', lg: 'flex' }} alignItems="center" w="100%">
{ hasInterpretationFeature && ( { hasInterpretationFeature && (
<Flex mr={{ base: 0, lg: 6 }} flexWrap="wrap"> <Flex mr={{ base: 0, lg: 6 }} flexWrap="wrap" alignItems="center">
<TxInterpretation <TxInterpretation
summary={ txInterpretationQuery.data?.data.summaries[0] } summary={ txInterpretationQuery.data?.data.summaries[0] }
isLoading={ txInterpretationQuery.isPlaceholderData } isLoading={ txInterpretationQuery.isPlaceholderData }
......
...@@ -26,9 +26,19 @@ const TxInterpretationElementByType = ({ variable }: { variable?: TxInterpretati ...@@ -26,9 +26,19 @@ const TxInterpretationElementByType = ({ variable }: { variable?: TxInterpretati
const { type, value } = variable; const { type, value } = variable;
switch (type) { switch (type) {
case 'address': case 'address':
return <AddressEntity address={ value } truncation="constant" sx={{ ':not(:first-child)': { marginLeft: 1 } }}/>; return <AddressEntity address={ value } truncation="constant" sx={{ ':not(:first-child)': { marginLeft: 1 } }} whiteSpace="initial"/>;
case 'token': case 'token':
return <TokenEntity token={ value } onlySymbol width="fit-content" sx={{ ':not(:first-child)': { marginLeft: 1 } }}/>; return (
<TokenEntity
token={ value }
onlySymbol
noCopy
width="fit-content"
sx={{ ':not(:first-child)': { marginLeft: 1 } }}
mr={ 2 }
whiteSpace="initial"
/>
);
case 'currency': { case 'currency': {
let numberString = ''; let numberString = '';
if (BigNumber(value).isLessThan(0.1)) { if (BigNumber(value).isLessThan(0.1)) {
...@@ -42,10 +52,10 @@ const TxInterpretationElementByType = ({ variable }: { variable?: TxInterpretati ...@@ -42,10 +52,10 @@ const TxInterpretationElementByType = ({ variable }: { variable?: TxInterpretati
} }
case 'timestamp': case 'timestamp':
// timestamp is in unix format // timestamp is in unix format
return <Text>{ dayjs(Number(value) * 1000).format('llll') + ' ' }</Text>; return <Text color="text_secondary">{ dayjs(Number(value) * 1000).format('llll') + ' ' }</Text>;
case 'string': case 'string':
default: { default: {
return <Text>{ value.toString() + ' ' }</Text>; return <Text color="text_secondary">{ value.toString() + ' ' }</Text>;
} }
} }
}; };
...@@ -67,8 +77,8 @@ const TxInterpretation = ({ summary, isLoading, className }: Props) => { ...@@ -67,8 +77,8 @@ const TxInterpretation = ({ summary, isLoading, className }: Props) => {
<Icon as={ actionIcon } boxSize={ 5 } color="text_secondary" mr={ 2 }/> <Icon as={ actionIcon } boxSize={ 5 } color="text_secondary" mr={ 2 }/>
{ chunks.map((chunk, index) => { { chunks.map((chunk, index) => {
return ( return (
<Flex whiteSpace="pre" key={ chunk + index }> <Flex whiteSpace="pre" key={ chunk + index } fontSize="lg" fontWeight={ 500 }>
<Text>{ chunk.trim() + (chunk.trim() && variablesNames[index] ? ' ' : '') }</Text> <Text color="text_secondary">{ chunk.trim() + (chunk.trim() && variablesNames[index] ? ' ' : '') }</Text>
{ index < variablesNames.length && ( { index < variablesNames.length && (
variablesNames[index] === NATIVE_COIN_SYMBOL_VAR_NAME ? variablesNames[index] === NATIVE_COIN_SYMBOL_VAR_NAME ?
<Text>{ config.chain.currency.symbol + ' ' }</Text> : <Text>{ config.chain.currency.symbol + ' ' }</Text> :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment