diff --git a/src/transaction/components/TransactionButton.tsx b/src/transaction/components/TransactionButton.tsx index 0ea65b44b4..557e7154d0 100644 --- a/src/transaction/components/TransactionButton.tsx +++ b/src/transaction/components/TransactionButton.tsx @@ -3,7 +3,7 @@ import { Spinner } from '../../internal/components/Spinner'; import { checkmarkSvg } from '../../internal/svg/checkmarkSvg'; import { background, cn, color, pressable, text } from '../../styles/theme'; import type { TransactionButtonReact } from '../types'; -import { isSpinnerDisplayed } from '../utils'; +import { isSpinnerDisplayed } from '../utils/isSpinnerDisplayed'; import { useTransactionContext } from './TransactionProvider'; export function TransactionButton({ diff --git a/src/transaction/types.ts b/src/transaction/types.ts index 5d1e40eeaf..441fcac2cb 100644 --- a/src/transaction/types.ts +++ b/src/transaction/types.ts @@ -6,6 +6,16 @@ import type { TransactionReceipt, } from 'viem'; +export type IsSpinnerDisplayedProps = { + errorMessage?: string; + hasReceipt?: boolean; + isLoading?: boolean; + statusWriteContract?: string; + statusWriteContracts?: string; + transactionHash?: string; + transactionId?: string; +}; + /** * Note: exported as public Type */ diff --git a/src/transaction/utils.test.ts b/src/transaction/utils/isSpinnerDisplayed.test.ts similarity index 97% rename from src/transaction/utils.test.ts rename to src/transaction/utils/isSpinnerDisplayed.test.ts index beb87a1716..8080ca9e69 100644 --- a/src/transaction/utils.test.ts +++ b/src/transaction/utils/isSpinnerDisplayed.test.ts @@ -1,4 +1,4 @@ -import { isSpinnerDisplayed } from './utils'; +import { isSpinnerDisplayed } from './isSpinnerDisplayed'; describe('isSpinnerDisplayed', () => { it('should return true if transaction hash exists', () => { diff --git a/src/transaction/utils.ts b/src/transaction/utils/isSpinnerDisplayed.ts similarity index 68% rename from src/transaction/utils.ts rename to src/transaction/utils/isSpinnerDisplayed.ts index b8096497a0..e095ba6b56 100644 --- a/src/transaction/utils.ts +++ b/src/transaction/utils/isSpinnerDisplayed.ts @@ -1,12 +1,4 @@ -type IsSpinnerDisplayedProps = { - errorMessage?: string; - hasReceipt?: boolean; - isLoading?: boolean; - statusWriteContract?: string; - statusWriteContracts?: string; - transactionHash?: string; - transactionId?: string; -}; +import type { IsSpinnerDisplayedProps } from '../types'; export function isSpinnerDisplayed({ errorMessage,