From 7dd881df7d3e07158bc4d2a214b89ddda4ae72bd Mon Sep 17 00:00:00 2001 From: Moritz Kirstein Date: Tue, 20 Feb 2024 17:50:17 +0100 Subject: [PATCH] refactor: rename verifiedWallets to verifiedAddresses --- address.config.js | 4 ++-- pontusxWallets.json => pontusxAddresses.json | 0 src/@hooks/useAddressConfig.ts | 8 ++++---- src/components/Home/TopSales/Account/index.tsx | 4 ++-- src/components/Profile/Header/Account.tsx | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) rename pontusxWallets.json => pontusxAddresses.json (100%) diff --git a/address.config.js b/address.config.js index 0de786b17..21193a2da 100644 --- a/address.config.js +++ b/address.config.js @@ -1,4 +1,4 @@ -const PONTUSX_WALLETS = require('./pontusxWallets.json') +const PONTUSX_ADDRESSES = require('./pontusxAddresses.json') module.exports = { whitelists: { @@ -59,5 +59,5 @@ module.exports = { ] } ], - verifiedWallets: PONTUSX_WALLETS + verifiedAddresses: PONTUSX_ADDRESSES } diff --git a/pontusxWallets.json b/pontusxAddresses.json similarity index 100% rename from pontusxWallets.json rename to pontusxAddresses.json diff --git a/src/@hooks/useAddressConfig.ts b/src/@hooks/useAddressConfig.ts index 8a781f98b..61322d8ea 100644 --- a/src/@hooks/useAddressConfig.ts +++ b/src/@hooks/useAddressConfig.ts @@ -2,11 +2,11 @@ import addressConfig from '../../address.config' const { whitelists, featured, - verifiedWallets + verifiedAddresses }: { whitelists: UseAddressConfig['whitelists'] featured: UseAddressConfig['featured'] - verifiedWallets: UseAddressConfig['verifiedWallets'] + verifiedAddresses: UseAddressConfig['verifiedAddresses'] } = addressConfig export interface UseAddressConfig { @@ -15,7 +15,7 @@ export interface UseAddressConfig { 'datatokens.address': string[] } featured: { assets: string[]; title: string }[] - verifiedWallets: { + verifiedAddresses: { [key: string]: string } isAddressWhitelisted: (address: string) => boolean @@ -70,7 +70,7 @@ export function useAddressConfig(): UseAddressConfig { return { whitelists, featured, - verifiedWallets, + verifiedAddresses, isAddressWhitelisted, isDDOWhitelisted, hasFeaturedAssets, diff --git a/src/components/Home/TopSales/Account/index.tsx b/src/components/Home/TopSales/Account/index.tsx index 72a677946..a3a0e2947 100644 --- a/src/components/Home/TopSales/Account/index.tsx +++ b/src/components/Home/TopSales/Account/index.tsx @@ -16,7 +16,7 @@ export default function Account({ account, place }: AccountProps): ReactElement { - const { verifiedWallets } = useAddressConfig() + const { verifiedAddresses } = useAddressConfig() return ( @@ -24,7 +24,7 @@ export default function Account({
- {verifiedWallets?.[account.id] || accountTruncate(account.id)} + {verifiedAddresses?.[account.id] || accountTruncate(account.id)}

{account.totalSales} diff --git a/src/components/Profile/Header/Account.tsx b/src/components/Profile/Header/Account.tsx index fab02f427..aa1770eb0 100644 --- a/src/components/Profile/Header/Account.tsx +++ b/src/components/Profile/Header/Account.tsx @@ -18,7 +18,7 @@ export default function Account({ }): ReactElement { const { chainIds } = useUserPreferences() const { autoWalletAddress } = useAutomation() - const { verifiedWallets } = useAddressConfig() + const { verifiedAddresses } = useAddressConfig() return (

@@ -31,7 +31,7 @@ export default function Account({

- {verifiedWallets?.[accountId] || accountTruncate(accountId)}{' '} + {verifiedAddresses?.[accountId] || accountTruncate(accountId)}{' '} {autoWalletAddress === accountId && (