diff --git a/components/bank/components/__tests__/tokenList.test.tsx b/components/bank/components/__tests__/tokenList.test.tsx index 30cb698..5f2cf6a 100644 --- a/components/bank/components/__tests__/tokenList.test.tsx +++ b/components/bank/components/__tests__/tokenList.test.tsx @@ -71,7 +71,14 @@ describe('TokenList', () => { pageSize={1} /> ); - expect(screen.getByText('utoken1')).toBeInTheDocument(); + const token1Row = screen.getByLabelText('utoken1'); + expect(token1Row).toBeInTheDocument(); + + const ticker = within(token1Row).getAllByText('TOKEN 1'); + expect(ticker).toHaveLength(2); + + const balance = within(token1Row).getByText('0.001'); + expect(balance).toBeInTheDocument(); }); test('displays loading skeleton when isLoading is true', () => { @@ -114,8 +121,10 @@ describe('TokenList', () => { searchTerm={'Token 1'} /> ); - expect(screen.getByText('Token 1')).toBeInTheDocument(); - expect(screen.queryByText('Token 2')).not.toBeInTheDocument(); + const token1Row = screen.getByLabelText('utoken1'); + const token2Row = screen.queryByLabelText('utoken2'); + expect(token1Row).toBeInTheDocument(); + expect(token2Row).not.toBeInTheDocument(); }); test('opens modal with correct denomination information', async () => { @@ -155,19 +164,4 @@ describe('TokenList', () => { expect(screen.getByText('0.001')).toBeInTheDocument(); expect(screen.getByText('0.002')).toBeInTheDocument(); }); - - test('displays correct base denomination for each token', () => { - renderWithChainProvider( - - ); - expect(screen.getByText('utoken1')).toBeInTheDocument(); - expect(screen.getByText('utoken2')).toBeInTheDocument(); - }); }); diff --git a/components/bank/components/tokenList.tsx b/components/bank/components/tokenList.tsx index 1c9b53f..4eb332d 100644 --- a/components/bank/components/tokenList.tsx +++ b/components/bank/components/tokenList.tsx @@ -107,14 +107,9 @@ export function TokenList(props: Readonly) { - - - {truncateString(balance.metadata?.display ?? '', 12)} - - - {balance.metadata?.denom_units[0]?.denom.split('/').pop()} - - + + {truncateString(balance.metadata?.display ?? '', 12).toUpperCase()} +
- {truncateString(balance.metadata?.display ?? '', 12)} -
- {balance.metadata?.denom_units[0]?.denom.split('/').pop()} -
+ {truncateString(balance.metadata?.display ?? '', 12).toUpperCase()} +