-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: switch to the new Account component (#2687)
- Loading branch information
1 parent
c66c692
commit a743279
Showing
13 changed files
with
49 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
import { memo } from 'react'; | ||
|
||
import { type Account as AccountType, type Chain } from '@/shared/core'; | ||
import { type AccountId, type Chain } from '@/shared/core'; | ||
import { toAddress } from '@/shared/lib/utils'; | ||
import { AccountExplorers } from '../AccountExplorer/AccountExplorers'; | ||
import { Address } from '../Address/Address'; | ||
|
||
type Props = { | ||
account: AccountType; | ||
accountId: AccountId; | ||
title?: string; | ||
chain: Chain; | ||
variant?: 'truncate' | 'short'; | ||
}; | ||
|
||
export const Account = memo(({ account, title, variant = 'truncate', chain }: Props) => { | ||
export const Account = memo(({ accountId, title, variant = 'truncate', chain }: Props) => { | ||
return ( | ||
<div className="flex w-max min-w-0 max-w-full items-center gap-2"> | ||
<Address | ||
showIcon | ||
variant={variant} | ||
title={title} | ||
address={toAddress(account.accountId, { prefix: chain.addressPrefix })} | ||
address={toAddress(accountId, { prefix: chain.addressPrefix })} | ||
/> | ||
<AccountExplorers accountId={account.accountId} chain={chain} /> | ||
<AccountExplorers accountId={accountId} chain={chain} /> | ||
</div> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters