Skip to content

Commit

Permalink
couple more robust places
Browse files Browse the repository at this point in the history
  • Loading branch information
isstuev committed Nov 4, 2024
1 parent 3ac4aeb commit f2d8963
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 16 deletions.
8 changes: 1 addition & 7 deletions types/api/address.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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 { InternalTransaction } from './internalTransaction';
import type { MudWorldSchema, MudWorldTable } from './mudWorlds';
Expand Down Expand Up @@ -271,12 +271,6 @@ export type AddressEpochRewardsItem = {
associated_account: AddressParam;
}

export type AddressFilecoinParams = {
actor_type?: FilecoinActorType;
id?: string | null;
robust?: string | null;
}

export type FilecoinActorType =
'account' |
'cron' |
Expand Down
7 changes: 6 additions & 1 deletion types/api/addressParams.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { AddressFilecoinParams } from './address';
import type { AddressMetadataTagApi } from './addressMetadata';

export interface AddressImplementation {
Expand All @@ -17,6 +16,12 @@ export interface WatchlistName {
display_name: string;
}

export type AddressFilecoinParams = {
actor_type?: FilecoinActorType;
id?: string | null;
robust?: string | null;
}

export interface UserTags {
private_tags: Array<AddressTag> | null;
watchlist_names: Array<WatchlistName> | null;
Expand Down
10 changes: 5 additions & 5 deletions ui/address/AddressDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import DetailsSponsoredItem from 'ui/shared/DetailsSponsoredItem';
import AddressEntity from 'ui/shared/entities/address/AddressEntity';
import BlockEntity from 'ui/shared/entities/block/BlockEntity';
import TxEntity from 'ui/shared/entities/tx/TxEntity';
import HashStringShortenDynamic from 'ui/shared/HashStringShortenDynamic';

import AddressBalance from './details/AddressBalance';
import AddressImplementations from './details/AddressImplementations';
Expand Down Expand Up @@ -134,10 +133,11 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
Ethereum Address
</DetailsInfoItem.Label>
<DetailsInfoItem.Value flexWrap="nowrap">
<Box overflow="hidden">
<HashStringShortenDynamic hash={ data.hash }/>
</Box>
<CopyToClipboard text={ data.hash }/>
<AddressEntity
address={{ hash: data.hash }}
noIcon
noLink
/>
</DetailsInfoItem.Value>
</>
) }
Expand Down
1 change: 0 additions & 1 deletion ui/pages/Address.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ const AddressPageContent = () => {
address={{
...addressQuery.data,
hash: checkSummedHash,
filecoin: addressQuery.data?.filecoin,
name: '',
ens_domain_name: '',
implementations: null,
Expand Down
2 changes: 1 addition & 1 deletion ui/shared/entities/address/AddressEntity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const Content = chakra((props: ContentProps) => {
const label = (
<VStack gap={ 0 } py={ 1 } color="inherit">
<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>
);

Expand Down
2 changes: 1 addition & 1 deletion ui/shared/entities/address/AddressEntityContentProxy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const AddressEntityContentProxy = (props: ContentProps) => {
Proxy contract
{ props.address.name ? ` (${ props.address.name })` : '' }
</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 }>
Implementation{ implementations.length > 1 ? 's' : '' }
{ implementationName ? ` (${ implementationName })` : '' }
Expand Down

0 comments on commit f2d8963

Please sign in to comment.