Skip to content

Commit 6bde427

Browse files
committed
refactor(DAO-2135): move deposit modal components into modals/deposit/ subfolder
Move BtcDepositModal, DepositSteps, DepositAmountStep, and DepositReviewStep (plus tests and stories) into modals/deposit/. Add barrel index.ts.
1 parent 11199c4 commit 6bde427

9 files changed

Lines changed: 11 additions & 10 deletions

src/app/btc-vault/components/BtcDepositModal.test.tsx renamed to src/app/btc-vault/components/modals/deposit/BtcDepositModal.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { cleanup, render, screen } from '@testing-library/react'
22
import userEvent from '@testing-library/user-event'
33
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest'
4-
import { DEPOSIT_EXPECTED_COMPLETION } from '../services/constants'
4+
import { DEPOSIT_EXPECTED_COMPLETION } from '../../../services/constants'
55
import { BtcDepositModal } from './BtcDepositModal'
66

77
const mockUseAccount = vi.fn()
@@ -12,11 +12,11 @@ vi.mock('wagmi', () => ({
1212
useAccount: () => mockUseAccount(),
1313
}))
1414

15-
vi.mock('../hooks/useUserPosition', () => ({
15+
vi.mock('../../../hooks/useUserPosition', () => ({
1616
useUserPosition: (address: string | undefined) => mockUseUserPosition(address),
1717
}))
1818

19-
vi.mock('../hooks/useVaultMetrics', () => ({
19+
vi.mock('../../../hooks/useVaultMetrics', () => ({
2020
useVaultMetrics: () => mockUseVaultMetrics(),
2121
}))
2222

src/app/btc-vault/components/BtcDepositModal.tsx renamed to src/app/btc-vault/components/modals/deposit/BtcDepositModal.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import { ProgressBar } from '@/components/ProgressBarNew'
99
import { Header } from '@/components/Typography'
1010
import { VAULT_SHARE_DECIMALS } from '@/lib/constants'
1111

12-
import { useUserPosition } from '../hooks/useUserPosition'
13-
import { useVaultMetrics } from '../hooks/useVaultMetrics'
14-
import { BTC_VAULT_DEPOSIT_FEE, DEPOSIT_STEP_PROGRESS } from '../services/constants'
15-
import type { DepositRequestParams } from '../services/types'
12+
import { useUserPosition } from '../../../hooks/useUserPosition'
13+
import { useVaultMetrics } from '../../../hooks/useVaultMetrics'
14+
import { BTC_VAULT_DEPOSIT_FEE, DEPOSIT_STEP_PROGRESS } from '../../../services/constants'
15+
import type { DepositRequestParams } from '../../../services/types'
1616
import { DepositAmountStep } from './DepositAmountStep'
1717
import { DepositReviewStep } from './DepositReviewStep'
1818
import { DepositSteps } from './DepositSteps'

src/app/btc-vault/components/DepositAmountStep.test.tsx renamed to src/app/btc-vault/components/modals/deposit/DepositAmountStep.test.tsx

File renamed without changes.

src/app/btc-vault/components/DepositAmountStep.tsx renamed to src/app/btc-vault/components/modals/deposit/DepositAmountStep.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { RBTC } from '@/lib/constants'
1515
import { cn, formatCurrency, handleAmountInput } from '@/lib/utils'
1616
import { usePricesContext } from '@/shared/context'
1717

18-
import { BTC_VAULT_DEPOSIT_DISCLAIMER } from '../services/constants'
18+
import { BTC_VAULT_DEPOSIT_DISCLAIMER } from '../../../services/constants'
1919

2020
interface DepositAmountStepProps {
2121
amount: string

src/app/btc-vault/components/DepositReviewStep.stories.tsx renamed to src/app/btc-vault/components/modals/deposit/DepositReviewStep.stories.tsx

File renamed without changes.

src/app/btc-vault/components/DepositReviewStep.test.tsx renamed to src/app/btc-vault/components/modals/deposit/DepositReviewStep.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { cleanup, render, screen } from '@testing-library/react'
22
import userEvent from '@testing-library/user-event'
33
import { afterEach, beforeAll, describe, expect, it, vi } from 'vitest'
44
import { DepositReviewStep } from './DepositReviewStep'
5-
import { DEPOSIT_EXPECTED_COMPLETION } from '../services/constants'
5+
import { DEPOSIT_EXPECTED_COMPLETION } from '../../../services/constants'
66

77
vi.mock('@/shared/context', () => ({
88
usePricesContext: () => ({ prices: {} }),

src/app/btc-vault/components/DepositReviewStep.tsx renamed to src/app/btc-vault/components/modals/deposit/DepositReviewStep.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { RBTC } from '@/lib/constants'
1212
import { formatCurrency, formatNumberWithCommas } from '@/lib/utils'
1313
import { usePricesContext } from '@/shared/context'
1414

15-
import { BTC_VAULT_DEPOSIT_DISCLAIMER, DEPOSIT_EXPECTED_COMPLETION } from '../services/constants'
15+
import { BTC_VAULT_DEPOSIT_DISCLAIMER, DEPOSIT_EXPECTED_COMPLETION } from '../../../services/constants'
1616

1717
interface DepositReviewStepProps {
1818
amount: string
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { BtcDepositModal } from './BtcDepositModal'

0 commit comments

Comments
 (0)