Commit ef7e9938 authored by isstuev's avatar isstuev

couple more robust places

parent c033e3b0
import type { Transaction } from 'types/api/transaction'; import type { Transaction } from 'types/api/transaction';
import type { UserTags, AddressImplementation, AddressParam } from './addressParams'; import type { UserTags, AddressImplementation, AddressParam, AddressFilecoinParams } from './addressParams';
import type { Block, EpochRewardsType } from './block'; import type { Block, EpochRewardsType } from './block';
import type { InternalTransaction } from './internalTransaction'; import type { InternalTransaction } from './internalTransaction';
import type { MudWorldSchema, MudWorldTable } from './mudWorlds'; import type { MudWorldSchema, MudWorldTable } from './mudWorlds';
...@@ -270,27 +270,3 @@ export type AddressEpochRewardsItem = { ...@@ -270,27 +270,3 @@ export type AddressEpochRewardsItem = {
epoch_number: number; epoch_number: number;
associated_account: AddressParam; associated_account: AddressParam;
} }
export type AddressFilecoinParams = {
actor_type?: FilecoinActorType;
id?: string | null;
robust?: string | null;
}
export type FilecoinActorType =
'account' |
'cron' |
'datacap' |
'eam' |
'ethaccount' |
'evm' |
'init' |
'market' |
'miner' |
'multisig' |
'paych' |
'placeholder' |
'power' |
'reward' |
'system' |
'verifreg';
import type { AddressFilecoinParams } from './address';
import type { AddressMetadataTagApi } from './addressMetadata'; import type { AddressMetadataTagApi } from './addressMetadata';
export interface AddressImplementation { export interface AddressImplementation {
...@@ -17,6 +16,30 @@ export interface WatchlistName { ...@@ -17,6 +16,30 @@ export interface WatchlistName {
display_name: string; display_name: string;
} }
export type AddressFilecoinParams = {
actor_type?: FilecoinActorType;
id?: string | null;
robust?: string | null;
}
export type FilecoinActorType =
'account' |
'cron' |
'datacap' |
'eam' |
'ethaccount' |
'evm' |
'init' |
'market' |
'miner' |
'multisig' |
'paych' |
'placeholder' |
'power' |
'reward' |
'system' |
'verifreg';
export interface UserTags { export interface UserTags {
private_tags: Array<AddressTag> | null; private_tags: Array<AddressTag> | null;
watchlist_names: Array<WatchlistName> | null; watchlist_names: Array<WatchlistName> | null;
......
...@@ -17,7 +17,6 @@ import DetailsSponsoredItem from 'ui/shared/DetailsSponsoredItem'; ...@@ -17,7 +17,6 @@ import DetailsSponsoredItem from 'ui/shared/DetailsSponsoredItem';
import AddressEntity from 'ui/shared/entities/address/AddressEntity'; import AddressEntity from 'ui/shared/entities/address/AddressEntity';
import BlockEntity from 'ui/shared/entities/block/BlockEntity'; import BlockEntity from 'ui/shared/entities/block/BlockEntity';
import TxEntity from 'ui/shared/entities/tx/TxEntity'; import TxEntity from 'ui/shared/entities/tx/TxEntity';
import HashStringShortenDynamic from 'ui/shared/HashStringShortenDynamic';
import AddressBalance from './details/AddressBalance'; import AddressBalance from './details/AddressBalance';
import AddressImplementations from './details/AddressImplementations'; import AddressImplementations from './details/AddressImplementations';
...@@ -134,10 +133,11 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => { ...@@ -134,10 +133,11 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
Ethereum Address Ethereum Address
</DetailsInfoItem.Label> </DetailsInfoItem.Label>
<DetailsInfoItem.Value flexWrap="nowrap"> <DetailsInfoItem.Value flexWrap="nowrap">
<Box overflow="hidden"> <AddressEntity
<HashStringShortenDynamic hash={ data.hash }/> address={{ hash: data.hash }}
</Box> noIcon
<CopyToClipboard text={ data.hash }/> noLink
/>
</DetailsInfoItem.Value> </DetailsInfoItem.Value>
</> </>
) } ) }
......
import { Tag } from '@chakra-ui/react'; import { Tag } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
import type { FilecoinActorType } from 'types/api/address'; import type { FilecoinActorType } from 'types/api/addressParams';
const ACTOR_TYPES: Record<FilecoinActorType, string> = { const ACTOR_TYPES: Record<FilecoinActorType, string> = {
account: 'Account', account: 'Account',
......
...@@ -349,7 +349,6 @@ const AddressPageContent = () => { ...@@ -349,7 +349,6 @@ const AddressPageContent = () => {
address={{ address={{
...addressQuery.data, ...addressQuery.data,
hash: checkSummedHash, hash: checkSummedHash,
filecoin: addressQuery.data?.filecoin,
name: '', name: '',
ens_domain_name: '', ens_domain_name: '',
implementations: null, implementations: null,
......
...@@ -99,7 +99,7 @@ const Content = chakra((props: ContentProps) => { ...@@ -99,7 +99,7 @@ const Content = chakra((props: ContentProps) => {
const label = ( const label = (
<VStack gap={ 0 } py={ 1 } color="inherit"> <VStack gap={ 0 } py={ 1 } color="inherit">
<Box fontWeight={ 600 } whiteSpace="pre-wrap" wordBreak="break-word">{ nameText }</Box> <Box fontWeight={ 600 } whiteSpace="pre-wrap" wordBreak="break-word">{ nameText }</Box>
<Box whiteSpace="pre-wrap" wordBreak="break-word">{ props.address.hash }</Box> <Box whiteSpace="pre-wrap" wordBreak="break-word">{ props.address.filecoin?.robust ?? props.address.hash }</Box>
</VStack> </VStack>
); );
......
...@@ -46,7 +46,7 @@ const AddressEntityContentProxy = (props: ContentProps) => { ...@@ -46,7 +46,7 @@ const AddressEntityContentProxy = (props: ContentProps) => {
Proxy contract Proxy contract
{ props.address.name ? ` (${ props.address.name })` : '' } { props.address.name ? ` (${ props.address.name })` : '' }
</Box> </Box>
<AddressEntity address={{ hash: props.address.hash }} noLink noIcon noHighlight justifyContent="center"/> <AddressEntity address={{ hash: props.address.hash, filecoin: props.address.filecoin }} noLink noIcon noHighlight justifyContent="center"/>
<Box fontWeight={ 600 } mt={ 2 }> <Box fontWeight={ 600 } mt={ 2 }>
Implementation{ implementations.length > 1 ? 's' : '' } Implementation{ implementations.length > 1 ? 's' : '' }
{ implementationName ? ` (${ implementationName })` : '' } { implementationName ? ` (${ implementationName })` : '' }
......
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