-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/evm' into fix/persist-after-address-deletion
# Conflicts: # src/domains/wallet/pages/WalletDetails/components/AddressesSidePanel/AddressesSidePanel.tsx
- Loading branch information
Showing
24 changed files
with
730 additions
and
621 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
43 changes: 43 additions & 0 deletions
43
src/domains/portfolio/components/PortfolioHeader/PortfolioHeader.blocks.tsx
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from "react"; | ||
import { Address } from "@/app/components/Address"; | ||
import { useWalletAlias } from "@/app/hooks"; | ||
import { Contracts } from "@ardenthq/sdk-profiles"; | ||
import { useTranslation } from "react-i18next"; | ||
|
||
export const ViewingAddressInfo = ({ | ||
profile, | ||
wallets, | ||
}: { | ||
profile: Contracts.IProfile; | ||
wallets: Contracts.IReadWriteWallet[]; | ||
}) => { | ||
const { t } = useTranslation(); | ||
const { getWalletAlias } = useWalletAlias(); | ||
const firstWallet = wallets.at(0); | ||
|
||
if (wallets.length === 1 && firstWallet) { | ||
const { alias } = getWalletAlias({ | ||
address: firstWallet.address(), | ||
network: firstWallet.network(), | ||
profile, | ||
}); | ||
|
||
return ( | ||
<Address | ||
alignment="center" | ||
walletName={alias} | ||
truncateOnTable | ||
maxNameChars={20} | ||
walletNameClass="text-theme-primary-600 text-sm leading-[17px] sm:text-base sm:leading-5 dark:textdark-theme-dark-navy-400" | ||
/> | ||
); | ||
} | ||
|
||
return ( | ||
<div className="dark:textdark-theme-dark-navy-400 text-base text-sm font-semibold leading-[17px] text-theme-primary-600 sm:text-base sm:leading-5"> | ||
{t("COMMON.MULTIPLE_ADDRESSES", { | ||
count: wallets.length, | ||
})} | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.