Skip to content

Commit b339ac3

Browse files
committed
Merge branch 'staging'
2 parents 386d7cf + 7ffa818 commit b339ac3

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

src/containers/Token/IOU/Header/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,15 @@ export const Header = ({
158158
<Currency currency={currency} />
159159
{tokenData.issuer_name && (
160160
<div className="token-issuer-wrap">
161+
(
161162
<span className="issuer-name">
162-
(
163163
{tokenData.issuer_name
164164
.trim()
165165
.toUpperCase()
166166
.replace(/\(/g, '')
167167
.replace(/\)/g, '')}
168-
)
169168
</span>
169+
)
170170
</div>
171171
)}
172172
</div>

src/containers/Token/IOU/test/Header/Header.test.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ describe('Header Component', () => {
118118
})
119119

120120
it('displays issuer name when available', () => {
121-
render(
121+
const { container } = render(
122122
<TestWrapper>
123123
<Header
124124
currency="USD"
@@ -129,7 +129,9 @@ describe('Header Component', () => {
129129
/>
130130
</TestWrapper>,
131131
)
132-
expect(screen.getByText('(TEST ISSUER)')).toBeInTheDocument()
132+
const issuerNameSpan = container.querySelector('.issuer-name')
133+
expect(issuerNameSpan).toBeInTheDocument()
134+
expect(issuerNameSpan?.textContent).toBe('TEST ISSUER')
133135
})
134136

135137
it('displays issuer domain link when available', () => {
@@ -340,7 +342,7 @@ describe('Header Component', () => {
340342
...mockTokenData,
341343
issuer_name: '(Test) Issuer (Name)',
342344
}
343-
render(
345+
const { container } = render(
344346
<TestWrapper>
345347
<Header
346348
currency="USD"
@@ -351,7 +353,10 @@ describe('Header Component', () => {
351353
/>
352354
</TestWrapper>,
353355
)
354-
expect(screen.getByText('(TEST ISSUER NAME)')).toBeInTheDocument()
356+
357+
const issuerNameSpan = container.querySelector('.issuer-name')
358+
expect(issuerNameSpan).toBeInTheDocument()
359+
expect(issuerNameSpan?.textContent).toBe('TEST ISSUER NAME')
355360
})
356361

357362
it('handles missing issuer name', () => {

src/containers/Token/MPT/Header/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,8 @@ export const Header = (props: Props) => {
164164
{/* Show issuer name if available */}
165165
{issuerName && (
166166
<div className="token-issuer-wrap">
167-
<span className="issuer-name">
168-
({shortenAccount(issuerName)})
169-
</span>
167+
(<span className="issuer-name">{shortenAccount(issuerName)}</span>
168+
)
170169
</div>
171170
)}
172171
</div>

0 commit comments

Comments
 (0)