Skip to content

Commit 3054c3d

Browse files
committed
refactor(DAO-2135): move withdraw modal components into modals/withdraw/ subfolder
Move BtcWithdrawModal, WithdrawSteps, WithdrawAmountStep, WithdrawAllowanceStep, and WithdrawReviewStep (plus tests and stories) into modals/withdraw/. Add barrel index.ts for withdraw/ and modals/.
1 parent 6bde427 commit 3054c3d

12 files changed

Lines changed: 11 additions & 8 deletions
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { BtcDepositModal } from './deposit/BtcDepositModal'
2+
export { BtcWithdrawModal } from './withdraw/BtcWithdrawModal'

src/app/btc-vault/components/BtcWithdrawModal.test.tsx renamed to src/app/btc-vault/components/modals/withdraw/BtcWithdrawModal.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ vi.mock('wagmi', () => ({
1717
useAccount: () => mockUseAccount(),
1818
}))
1919

20-
vi.mock('../hooks/useUserPosition', () => ({
20+
vi.mock('../../../hooks/useUserPosition', () => ({
2121
useUserPosition: (address: string | undefined) => mockUseUserPosition(address),
2222
}))
2323

24-
vi.mock('../hooks/useVaultMetrics', () => ({
24+
vi.mock('../../../hooks/useVaultMetrics', () => ({
2525
useVaultMetrics: () => mockUseVaultMetrics(),
2626
}))
2727

src/app/btc-vault/components/BtcWithdrawModal.tsx renamed to src/app/btc-vault/components/modals/withdraw/BtcWithdrawModal.tsx

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

13-
import { useUserPosition } from '../hooks/useUserPosition'
14-
import { useVaultMetrics } from '../hooks/useVaultMetrics'
15-
import { BTC_VAULT_WITHDRAWAL_FEE, WITHDRAWAL_STEP_PROGRESS } from '../services/constants'
13+
import { useUserPosition } from '../../../hooks/useUserPosition'
14+
import { useVaultMetrics } from '../../../hooks/useVaultMetrics'
15+
import { BTC_VAULT_WITHDRAWAL_FEE, WITHDRAWAL_STEP_PROGRESS } from '../../../services/constants'
1616
import { WithdrawAllowanceStep } from './WithdrawAllowanceStep'
1717
import { WithdrawAmountStep } from './WithdrawAmountStep'
1818
import { WithdrawReviewStep } from './WithdrawReviewStep'

src/app/btc-vault/components/WithdrawAllowanceStep.test.tsx renamed to src/app/btc-vault/components/modals/withdraw/WithdrawAllowanceStep.test.tsx

File renamed without changes.

src/app/btc-vault/components/WithdrawAllowanceStep.tsx renamed to src/app/btc-vault/components/modals/withdraw/WithdrawAllowanceStep.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Divider } from '@/components/Divider'
99
import { TransactionInProgressButton } from '@/components/StepActionButtons'
1010
import { Label, Paragraph } from '@/components/Typography'
1111

12-
import { BTC_VAULT_WITHDRAW_TWO_TX_MESSAGE } from '../services/constants'
12+
import { BTC_VAULT_WITHDRAW_TWO_TX_MESSAGE } from '../../../services/constants'
1313

1414
interface WithdrawAllowanceStepProps {
1515
sharesWei: bigint

src/app/btc-vault/components/WithdrawAmountStep.test.tsx renamed to src/app/btc-vault/components/modals/withdraw/WithdrawAmountStep.test.tsx

File renamed without changes.

src/app/btc-vault/components/WithdrawAmountStep.tsx renamed to src/app/btc-vault/components/modals/withdraw/WithdrawAmountStep.tsx

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

17-
import { BTC_VAULT_WITHDRAWAL_DISCLAIMER } from '../services/constants'
17+
import { BTC_VAULT_WITHDRAWAL_DISCLAIMER } from '../../../services/constants'
1818

1919
interface WithdrawAmountStepProps {
2020
amount: string

src/app/btc-vault/components/WithdrawReviewStep.stories.tsx renamed to src/app/btc-vault/components/modals/withdraw/WithdrawReviewStep.stories.tsx

File renamed without changes.

src/app/btc-vault/components/WithdrawReviewStep.test.tsx renamed to src/app/btc-vault/components/modals/withdraw/WithdrawReviewStep.test.tsx

File renamed without changes.

src/app/btc-vault/components/WithdrawReviewStep.tsx renamed to src/app/btc-vault/components/modals/withdraw/WithdrawReviewStep.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
BTC_VAULT_WITHDRAW_REQUEST_TX_HINT,
1717
BTC_VAULT_WITHDRAWAL_DISCLAIMER,
1818
WITHDRAWAL_EXPECTED_COMPLETION,
19-
} from '../services/constants'
19+
} from '../../../services/constants'
2020

2121
interface WithdrawReviewStepProps {
2222
amount: string

0 commit comments

Comments
 (0)