Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ui/home/LatestTxsItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const LatestTxsItem = ({ tx, isLoading }: Props) => {
<Box ml={ 3 } w="calc(100% - 40px)">
<HStack flexWrap={ tagsCount <= 3 ? 'nowrap' : 'wrap' } my="3px">
<TxType types={ tx.transaction_types } isLoading={ isLoading }/>
<TxStatus status={ tx.status } errorText={ tx.status === 'error' ? tx.result : undefined } isLoading={ isLoading }/>
{ tx.status !== 'ok' && <TxStatus status={ tx.status } errorText={ tx.status === 'error' ? tx.result : undefined } isLoading={ isLoading }/> }
<TxWatchListTags tx={ tx } isLoading={ isLoading }/>
{ protocolTag && <EntityTag data={ protocolTag } isLoading={ isLoading } minW="0"/> }
</HStack>
Expand Down
2 changes: 1 addition & 1 deletion ui/home/LatestTxsItemMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const LatestTxsItem = ({ tx, isLoading }: Props) => {
<Flex justifyContent="space-between">
<HStack>
<TxType types={ tx.transaction_types } isLoading={ isLoading }/>
<TxStatus status={ tx.status } errorText={ tx.status === 'error' ? tx.result : undefined } isLoading={ isLoading }/>
{ tx.status !== 'ok' && <TxStatus status={ tx.status } errorText={ tx.status === 'error' ? tx.result : undefined } isLoading={ isLoading }/> }
<TxWatchListTags tx={ tx } isLoading={ isLoading }/>
{ protocolTag && <EntityTag data={ protocolTag } isLoading={ isLoading } minW="0"/> }
</HStack>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ui/internalTxs/InternalTxsListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const InternalTxsListItem = ({
<ListItemMobile rowGap={ 3 }>
<Flex columnGap={ 2 }>
{ typeTitle && <Badge colorPalette="cyan" loading={ isLoading }>{ typeTitle }</Badge> }
<TxStatus status={ success ? 'ok' : 'error' } errorText={ error } isLoading={ isLoading }/>
{ !success && <TxStatus status="error" errorText={ error } isLoading={ isLoading }/> }
</Flex>
<Flex justifyContent="space-between" width="100%">
<TxEntity
Expand Down
22 changes: 12 additions & 10 deletions ui/internalTxs/InternalTxsTableItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ const InternalTxsTableItem = ({
<TableRow alignItems="top">
{ chainData && (
<TableCell>
<ChainIcon data={ chainData } isLoading={ isLoading } my="3px"/>
<ChainIcon data={ chainData } isLoading={ isLoading } my="2px"/>
</TableCell>
) }
<TableCell verticalAlign="middle">
<Flex rowGap={ 3 } flexDir="column">
<TableCell>
<Flex rowGap={ 3 } flexDir="column" my="2px">
<TxEntity
hash={ txnHash }
isLoading={ isLoading }
Expand All @@ -63,41 +63,43 @@ const InternalTxsTableItem = ({
/>
</Flex>
</TableCell>
<TableCell verticalAlign="middle">
<Flex rowGap={ 3 } flexDir="column">
<TableCell>
<Flex rowGap={ 2 } flexDir="column">
{ typeTitle && (
<Badge colorPalette="cyan" loading={ isLoading }>{ typeTitle }</Badge>
) }
<TxStatus status={ success ? 'ok' : 'error' } errorText={ error } isLoading={ isLoading }/>
{ !success && <TxStatus status="error" errorText={ error } isLoading={ isLoading }/> }
</Flex>
</TableCell>
{ showBlockInfo && (
<TableCell verticalAlign="middle">
<TableCell>
<BlockEntity
isLoading={ isLoading }
number={ blockNumber }
noIcon
textStyle="sm"
fontWeight={ 500 }
my="2px"
/>
</TableCell>
) }
<TableCell verticalAlign="middle">
<TableCell>
<AddressFromTo
from={ from }
to={ toData }
current={ currentAddress }
isLoading={ isLoading }
my="2px"
/>
</TableCell>
<TableCell isNumeric verticalAlign="middle">
<TableCell isNumeric>
<NativeCoinValue
amount={ value }
noSymbol
accuracy={ 0 }
loading={ isLoading }
minW={ 6 }
verticalAlign="middle"
my="2px"
/>
</TableCell>
</TableRow>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions ui/shared/statusTag/TxStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ import React from 'react';

import type { Transaction } from 'types/api/transaction';

import type { BadgeProps } from 'toolkit/chakra/badge';

import type { StatusTagType } from './StatusTag';
import StatusTag from './StatusTag';

export interface Props {
export interface Props extends BadgeProps {
status: Transaction['status'];
errorText?: string | null;
isLoading?: boolean;
}

const TxStatus = ({ status, errorText, isLoading }: Props) => {
const TxStatus = ({ status, errorText, isLoading, ...rest }: Props) => {
if (status === undefined) {
return null;
}
Expand All @@ -34,7 +36,7 @@ const TxStatus = ({ status, errorText, isLoading }: Props) => {
break;
}

return <StatusTag type={ type } text={ text } errorText={ errorText } loading={ isLoading }/>;
return <StatusTag type={ type } text={ text } errorText={ errorText } loading={ isLoading } { ...rest }/>;
};

export default TxStatus;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ui/tx/internals/TxInternalsListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const TxInternalsListItem = ({ type, from, to, value, success, error, gas_limit:
<ListItemMobile rowGap={ 3 }>
<Flex columnGap={ 2 }>
{ typeTitle && <Badge colorPalette="cyan" loading={ isLoading }>{ typeTitle }</Badge> }
<TxStatus status={ success ? 'ok' : 'error' } errorText={ error } isLoading={ isLoading }/>
{ !success && <TxStatus status="error" errorText={ error } isLoading={ isLoading }/> }
</Flex>
<AddressFromTo
from={ from }
Expand Down
2 changes: 1 addition & 1 deletion ui/tx/internals/TxInternalsTableItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const TxInternalTableItem = ({ type, from, to, value, success, error, gas_limit:
<Badge colorPalette="cyan" mr={ 5 } loading={ isLoading }>{ typeTitle }</Badge>
</Box>
) }
<TxStatus status={ success ? 'ok' : 'error' } errorText={ error } isLoading={ isLoading }/>
{ !success && <TxStatus status="error" errorText={ error } isLoading={ isLoading }/> }
</Flex>
</TableCell>
<TableCell verticalAlign="middle">
Expand Down
2 changes: 1 addition & 1 deletion ui/txs/TxAdditionalInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const TxAdditionalInfo = ({ hash, tx, isMobile, isLoading, className }: Props) =
</PopoverTrigger>
<PopoverContent w="330px">
<PopoverBody>
<Heading level="3" mb={ 6 }>Additional info </Heading>
<Heading level="3" mb={ 4 }>Additional info </Heading>
{ content }
</PopoverBody>
</PopoverContent>
Expand Down
1 change: 1 addition & 0 deletions ui/txs/TxAdditionalInfoContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const TxAdditionalInfoContainer = ({ hash }: Props) => {
if (isPending) {
return (
<Box>
<Skeleton loading w="80px" h="24px" borderRadius="sm" mb={ 3 }/>
<Box>
<Skeleton loading w="110px" h="16px" borderRadius="full" mb={ 3 }/>
<Skeleton loading w="100%" h="16px" borderRadius="full"/>
Expand Down
2 changes: 2 additions & 0 deletions ui/txs/TxAdditionalInfoContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { useMultichainContext } from 'lib/contexts/multichain';
import { currencyUnits } from 'lib/units';
import { Link } from 'toolkit/chakra/link';
import BlobEntity from 'ui/shared/entities/blob/BlobEntity';
import TxStatus from 'ui/shared/statusTag/TxStatus';
import TextSeparator from 'ui/shared/TextSeparator';
import TxFee from 'ui/shared/tx/TxFee';
import Utilization from 'ui/shared/Utilization/Utilization';
Expand All @@ -33,6 +34,7 @@ const TxAdditionalInfoContent = ({ tx }: { tx: Transaction }) => {

return (
<>
<TxStatus status={ tx.status } errorText={ tx.status === 'error' ? tx.result : undefined } mb={ 3 }/>
{ tx.blob_versioned_hashes && tx.blob_versioned_hashes.length > 0 && (
<Box { ...sectionProps } mb={ 4 }>
<Flex alignItems="center" justifyContent="space-between">
Expand Down
2 changes: 1 addition & 1 deletion ui/txs/TxsListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const TxsListItem = ({
) :
<TxType types={ tx.transaction_types } isLoading={ isLoading }/>
}
<TxStatus status={ tx.status } errorText={ tx.status === 'error' ? tx.result : undefined } isLoading={ isLoading }/>
{ tx.status !== 'ok' && <TxStatus status={ tx.status } errorText={ tx.status === 'error' ? tx.result : undefined } isLoading={ isLoading }/> }
<TxWatchListTags tx={ tx } isLoading={ isLoading }/>
{ protocolTag && <EntityTag data={ protocolTag } isLoading={ isLoading }/> }
</HStack>
Expand Down
2 changes: 1 addition & 1 deletion ui/txs/TxsTableItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const TxsTableItem = ({
) :
<TxType types={ tx.transaction_types } isLoading={ isLoading }/>
}
<TxStatus status={ tx.status } errorText={ tx.status === 'error' ? tx.result : undefined } isLoading={ isLoading }/>
{ tx.status !== 'ok' && <TxStatus status={ tx.status } errorText={ tx.status === 'error' ? tx.result : undefined } isLoading={ isLoading }/> }
<TxWatchListTags tx={ tx } isLoading={ isLoading }/>
</VStack>
</TableCell>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading