diff --git a/frontend/src/features/collections/components/collection-card/collection-card.tsx b/frontend/src/features/collections/components/collection-card/collection-card.tsx index 52fe26f..21b4110 100644 --- a/frontend/src/features/collections/components/collection-card/collection-card.tsx +++ b/frontend/src/features/collections/components/collection-card/collection-card.tsx @@ -1,3 +1,4 @@ +import { getVaraAddress } from '@gear-js/react-hooks'; import { Identicon } from '@polkadot/react-identicon'; import { Link, generatePath } from 'react-router-dom'; @@ -47,7 +48,7 @@ function CollectionCard({ id, name, collectionBanner, collectionLogo, admin, tok
- {admin} + {getVaraAddress(admin)}
diff --git a/frontend/src/features/collections/components/nft-card/nft-card.tsx b/frontend/src/features/collections/components/nft-card/nft-card.tsx index 8572ea9..3eb3ae5 100644 --- a/frontend/src/features/collections/components/nft-card/nft-card.tsx +++ b/frontend/src/features/collections/components/nft-card/nft-card.tsx @@ -1,4 +1,4 @@ -import { useBalanceFormat } from '@gear-js/react-hooks'; +import { getVaraAddress, useBalanceFormat } from '@gear-js/react-hooks'; import { Link, generatePath } from 'react-router-dom'; import { PriceInfoCard, InfoCard } from '@/components'; @@ -35,7 +35,7 @@ function NFTCard({ sales, auctions, ...nft }: Props) {

{name}

- Owned by {owner} + Owned by {getVaraAddress(owner)}

diff --git a/frontend/src/features/wallet/components/account-button/account-button.tsx b/frontend/src/features/wallet/components/account-button/account-button.tsx index ed2228a..27a1849 100644 --- a/frontend/src/features/wallet/components/account-button/account-button.tsx +++ b/frontend/src/features/wallet/components/account-button/account-button.tsx @@ -1,3 +1,4 @@ +import { getVaraAddress } from '@gear-js/react-hooks'; import { Button, ButtonProps } from '@gear-js/vara-ui'; import { Identicon } from '@polkadot/react-identicon'; @@ -15,7 +16,7 @@ type Props = { function AccountButton({ address, name, color, size, block, onClick }: Props) { return ( ); } diff --git a/frontend/src/features/wallet/components/wallet-modal/wallet-modal.tsx b/frontend/src/features/wallet/components/wallet-modal/wallet-modal.tsx index 63157bb..fa90728 100644 --- a/frontend/src/features/wallet/components/wallet-modal/wallet-modal.tsx +++ b/frontend/src/features/wallet/components/wallet-modal/wallet-modal.tsx @@ -1,5 +1,4 @@ -import { decodeAddress } from '@gear-js/api'; -import { useAccount, useAlert } from '@gear-js/react-hooks'; +import { getVaraAddress, useAccount, useAlert } from '@gear-js/react-hooks'; import { Button, Modal } from '@gear-js/vara-ui'; import CopySVG from '../../assets/copy.svg?react'; @@ -66,10 +65,10 @@ function WalletModal({ close }: Props) { }; const handleCopyClick = () => { - const decodedAddress = decodeAddress(address); + const encodedAddress = getVaraAddress(address); navigator.clipboard - .writeText(decodedAddress) + .writeText(encodedAddress) .then(() => { close(); alert.success('Copied'); diff --git a/frontend/src/pages/nft/nft.tsx b/frontend/src/pages/nft/nft.tsx index d078018..2f3d821 100644 --- a/frontend/src/pages/nft/nft.tsx +++ b/frontend/src/pages/nft/nft.tsx @@ -1,4 +1,4 @@ -import { useAccount } from '@gear-js/react-hooks'; +import { getVaraAddress, useAccount } from '@gear-js/react-hooks'; import { Identicon } from '@polkadot/react-identicon'; import { useState } from 'react'; import { generatePath, useParams } from 'react-router-dom'; @@ -91,7 +91,7 @@ function NFT() { {owner ? (

- Owned by {owner} + Owned by {getVaraAddress(owner)}

) : (