Skip to content

Commit

Permalink
fix type problem
Browse files Browse the repository at this point in the history
  • Loading branch information
vorujack committed Apr 20, 2024
1 parent 52e4de0 commit 1fce435
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/action/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ const syncInfo = async (network: AbstractNetwork, address: Address) => {
}
};


const syncAssets = async (
network: AbstractNetwork,
networkType: string,
Expand Down
7 changes: 3 additions & 4 deletions src/pages/wallet-page/asset/AssetItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ const AssetItem = (props: PropsType) => {
<Box sx={{ float: 'left', mr: 2 }}>
{details.logo ? (
<Avatar alt={details.name}>
<details.logo/>
<details.logo />
</Avatar>
) : (
<Avatar alt={details.name} src='/' />
<Avatar alt={details.name} src="/" />
)}

</Box>
<Box display="flex">
<Typography sx={{ flexGrow: 1 }}>{details.name}</Typography>
Expand All @@ -53,8 +52,8 @@ const AssetItem = (props: PropsType) => {
>
<AssetItemDetail
id={props.id}
logo={details.logo}
name={details.name}
logoSrc={details.logoSrc}
balance={
<TokenAmountDisplay
amount={props.amount}
Expand Down
14 changes: 6 additions & 8 deletions src/pages/wallet-page/asset/AssetItemDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface AssetItemDetailPropsType {
name?: string;
id: string;
description?: string;
logoSrc?: string;
logo?: React.ElementType;
balance: React.ReactNode | string;
emissionAmount: React.ReactNode | string;
txId: string;
Expand All @@ -20,13 +20,11 @@ const AssetItemDetail = (props: AssetItemDetailPropsType) => {
<React.Fragment>
<Box display="flex" alignItems="start">
<Box>
{props.logoSrc && (
<Avatar
alt={props.name}
src={props.logoSrc}
sx={{ mt: 2, width: 64, height: 64 }}
/>
)}
{props.logo ? (
<Avatar sx={{ mt: 2, width: 64, height: 64 }} alt={props.name}>
<props.logo />
</Avatar>
) : undefined}
<Typography variant="h2" sx={{ mt: 2 }}>
{props.name}
</Typography>
Expand Down

0 comments on commit 1fce435

Please sign in to comment.