Skip to content

Commit 11199c4

Browse files
committed
refactor(DAO-2135): move request-processing components into subfolder
Move ActiveRequestSection and RequestProcessingBlock (plus tests and stories) from btc-vault root and components/ into request-processing/ subfolder. Add barrel index.ts.
1 parent 745f48c commit 11199c4

8 files changed

Lines changed: 13 additions & 11 deletions

File tree

src/app/btc-vault/BtcVaultPage.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ vi.mock('@/components/Countdown/Countdown', () => ({
7373
Countdown: () => <span data-testid="countdown">5d 23h 59m</span>,
7474
}))
7575

76-
vi.mock('./ActiveRequestSection', () => ({
76+
vi.mock('./components/request-processing/ActiveRequestSection', () => ({
7777
ActiveRequestSection: () => null,
7878
}))
7979

src/app/btc-vault/BtcVaultPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useAccount } from 'wagmi'
44

55
import { SectionContainer } from '@/app/communities/components/SectionContainer'
66

7-
import { ActiveRequestSection } from './ActiveRequestSection'
7+
import { ActiveRequestSection } from './components/request-processing/ActiveRequestSection'
88
import { BtcVaultBanners } from './BtcVaultBanners'
99
import { BtcVaultDashboard } from './components/BtcVaultDashboard'
1010
import { BtcVaultMetrics } from './components/BtcVaultMetrics'

src/app/btc-vault/ActiveRequestSection.test.tsx renamed to src/app/btc-vault/components/request-processing/ActiveRequestSection.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { render, screen } from '@testing-library/react'
22
import { describe, it, expect, vi, beforeAll, beforeEach } from 'vitest'
33

4-
import type { ActiveRequestDisplay } from './services/ui/types'
4+
import type { ActiveRequestDisplay } from '../../services/ui/types'
55

66
vi.mock('@/components/ProgressBarNew', async (importOriginal) => {
77
const React = require('react')

src/app/btc-vault/ActiveRequestSection.tsx renamed to src/app/btc-vault/components/request-processing/ActiveRequestSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import { SectionContainer } from '@/app/communities/components/SectionContainer'
44

5-
import { RequestProcessingBlock } from './components/RequestProcessingBlock'
6-
import type { ActiveRequestDisplay } from './services/ui/types'
5+
import { RequestProcessingBlock } from './RequestProcessingBlock'
6+
import type { ActiveRequestDisplay } from '../../services/ui/types'
77

88
interface ActiveRequestSectionProps {
99
data: ActiveRequestDisplay[] | undefined

src/app/btc-vault/RequestProcessingBlock.stories.tsx renamed to src/app/btc-vault/components/request-processing/RequestProcessingBlock.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Meta, StoryObj } from '@storybook/nextjs'
22
import { SectionContainer } from '@/app/communities/components/SectionContainer'
3-
import { RequestProcessingBlock } from './components/RequestProcessingBlock'
4-
import type { ActiveRequestDisplay } from './services/ui/types'
3+
import { RequestProcessingBlock } from './RequestProcessingBlock'
4+
import type { ActiveRequestDisplay } from '../../services/ui/types'
55

66
const meta = {
77
title: 'BTC Vault/RequestProcessingBlock',

src/app/btc-vault/RequestProcessingBlock.test.tsx renamed to src/app/btc-vault/components/request-processing/RequestProcessingBlock.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { render, screen, within } from '@testing-library/react'
22
import { describe, it, expect, vi, beforeAll } from 'vitest'
3-
import { RequestProcessingBlock } from './components/RequestProcessingBlock'
4-
import type { ActiveRequestDisplay } from './services/ui/types'
3+
import { RequestProcessingBlock } from './RequestProcessingBlock'
4+
import type { ActiveRequestDisplay } from '../../services/ui/types'
55

66
vi.mock('next/image', () => ({
77
default: (props: Record<string, unknown>) => require('react').createElement('img', props),

src/app/btc-vault/components/RequestProcessingBlock.tsx renamed to src/app/btc-vault/components/request-processing/RequestProcessingBlock.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { RBTC } from '@/lib/constants'
1010
import { cn } from '@/lib/utils'
1111
import { btcVaultRequestHistory } from '@/shared/constants/routes'
1212

13-
import { RequestStatusStepper } from '../request-history/[id]/components/RequestStatusStepper'
14-
import type { ActiveRequestDisplay } from '../services/ui/types'
13+
import { RequestStatusStepper } from '../../request-history/[id]/components/RequestStatusStepper'
14+
import type { ActiveRequestDisplay } from '../../services/ui/types'
1515

1616
function getRequestTypeLabel(type: ActiveRequestDisplay['type']): string {
1717
return type === 'deposit' ? 'Deposit' : 'Withdrawal'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { ActiveRequestSection } from './ActiveRequestSection'
2+
export { RequestProcessingBlock } from './RequestProcessingBlock'

0 commit comments

Comments
 (0)