From 647f0f7f1f749382510b96069e316a991ffd6b42 Mon Sep 17 00:00:00 2001 From: Noah Gundotra Date: Thu, 10 Oct 2024 07:28:21 -0400 Subject: [PATCH] add token state back to token account sections --- app/components/account/TokenAccountSection.tsx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/app/components/account/TokenAccountSection.tsx b/app/components/account/TokenAccountSection.tsx index b446e16f..4bca9bfa 100644 --- a/app/components/account/TokenAccountSection.tsx +++ b/app/components/account/TokenAccountSection.tsx @@ -37,6 +37,7 @@ import { TransferHookAccount, } from '@validators/accounts/token-extension'; import { BigNumber } from 'bignumber.js'; +import { capitalCase } from 'change-case'; import { useEffect, useMemo, useState } from 'react'; import { ExternalLink, RefreshCw } from 'react-feather'; import { create } from 'superstruct'; @@ -59,6 +60,11 @@ const getEthAddress = (link?: string) => { return address; }; +const StatusBadge = ({ status }: { status: string }) => { + const badgeClass = status === 'initialized' ? 'bg-success-soft' : 'bg-warning-soft'; + return {capitalCase(status)}; +}; + export function TokenAccountSection({ account, tokenAccount, @@ -465,12 +471,12 @@ function TokenAccountCard({ account, info }: { account: Account; info: TokenAcco Token balance {typeof symbol === 'string' && `(${symbol})`} {balance} - {info.state === 'uninitialized' && ( - - Status - Uninitialized - - )} + + Status + + + + {info.rentExemptReserve && ( Rent-exempt reserve (SOL)