-
- {displayNfts.slice(0, 3).map((nft, index) => (
-
- ))}
- {!!remainingCount && (
-
- +{remainingCount} more
-
- )}
-
- {max && !max.isZero() && (
-
+
+
+
My NFT Votes
+
+
+ {displayNfts.slice(0, 3).map((nft, index) => (
+
+ ))}
+ {!!remainingCount && (
+
+ +{remainingCount} more
+
)}
+ {max && !max.isZero() && (
+
+ )}
- {connected && !ownTokenRecord && (
-
- )}
-
+ {connected && !ownTokenRecord && (
+
+ )}
+
)
}
-
-const Wrapper = (props: Props) => {
- if (props.inAccountDetails) {
- return
{props.children}
- } else {
- return <>{props.children}>
- }
-}
diff --git a/components/TokenBalance/TokenBalanceCardWrapper.tsx b/components/TokenBalance/TokenBalanceCardWrapper.tsx
index e9e35a3058..c34a674772 100644
--- a/components/TokenBalance/TokenBalanceCardWrapper.tsx
+++ b/components/TokenBalance/TokenBalanceCardWrapper.tsx
@@ -8,10 +8,7 @@ import ClaimUnreleasedNFTs from './ClaimUnreleasedNFTs'
import Link from 'next/link'
import { useAddressQuery_CommunityTokenOwner } from '@hooks/queries/addresses/tokenOwnerRecord'
import useWalletOnePointOh from '@hooks/useWalletOnePointOh'
-import {
- useUserCommunityTokenOwnerRecord,
- useUserCouncilTokenOwnerRecord,
-} from '@hooks/queries/tokenOwnerRecord'
+import { useUserCommunityTokenOwnerRecord } from '@hooks/queries/tokenOwnerRecord'
import { useRealmConfigQuery } from '@hooks/queries/realmConfig'
import ClaimUnreleasedPositions from 'HeliumVotePlugin/components/ClaimUnreleasedPositions'
import VanillaAccountDetails from './VanillaAccountDetails'
@@ -68,10 +65,9 @@ const TokenBalanceCardInner = ({
inAccountDetails?: boolean
}) => {
const ownTokenRecord = useUserCommunityTokenOwnerRecord().data?.result
- const ownCouncilTokenRecord = useUserCouncilTokenOwnerRecord().data?.result
const config = useRealmConfigQuery().data?.result
- const { councilTokenAccount, vsrMode } = useRealm()
+ const { vsrMode } = useRealm()
const currentPluginPk = config?.account?.communityTokenConfig.voterWeightAddin
const isNftMode =
currentPluginPk && NFT_PLUGINS_PKS.includes(currentPluginPk?.toBase58())
@@ -100,35 +96,15 @@ const TokenBalanceCardInner = ({
)
}
- if (
- isNftMode &&
- (!ownTokenRecord ||
- ownTokenRecord.account.governingTokenDepositAmount.isZero())
- ) {
+ if (isNftMode && inAccountDetails) {
return (
- <>
- {(ownCouncilTokenRecord &&
- !ownCouncilTokenRecord?.account.governingTokenDepositAmount.isZero()) ||
- (councilTokenAccount &&
- !councilTokenAccount?.account.amount.isZero()) ? (
- <>
- {!inAccountDetails &&
}
-
- {inAccountDetails ? (
-
- ) : (
-
- )}
-
- >
- ) : (
- <>
- {!inAccountDetails &&
}
-
-
- >
- )}
- >
+
)
}
diff --git a/components/TokenBalance/TokenDeposit.tsx b/components/TokenBalance/TokenDeposit.tsx
index 8b4af9f79c..0bf0f3b283 100644
--- a/components/TokenBalance/TokenDeposit.tsx
+++ b/components/TokenBalance/TokenDeposit.tsx
@@ -303,15 +303,9 @@ export const TokenDeposit = ({
}
return (
-
- {inAccountDetails && (
-
- {tokenRole === GoverningTokenRole.Community ? `Community` : `Council`}
-
- )}
-
+
{(availableTokens != '0' || inAccountDetails) && (
-
+
{tokenRole === GoverningTokenRole.Community ? (
) : (
@@ -378,19 +372,6 @@ export const TokenDeposit = ({
Please withdraw your tokens and deposit again to get governance power
)}
-
+
)
}
-const TokenDepositWrapper = ({
- children,
- inAccountDetails,
-}: {
- inAccountDetails?: boolean
- children: React.ReactNode
-}) => {
- if (inAccountDetails) {
- return
{children}
- } else {
- return
{children}
- }
-}