Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

style(recovery-phrase): reorder imports and reformat test mocks

Steven Enamakel2604a782ae4d
diff --git a/app/src/components/settings/panels/RecoveryPhrasePanel.tsx b/app/src/components/settings/panels/RecoveryPhrasePanel.tsx
index 927f3e401c..e48bb1428b 100644
--- a/app/src/components/settings/panels/RecoveryPhrasePanel.tsx
+++ b/app/src/components/settings/panels/RecoveryPhrasePanel.tsx
@@ -7,8 +7,8 @@ import { useCoreState } from '../../../providers/CoreStateProvider';
import {
fetchWalletStatus,
generateRecoveryPhrase,
- type WalletStatus,
validateRecoveryPhrase,
+ type WalletStatus,
} from '../../../services/walletApi';
import { MNEMONIC_GENERATE_WORD_COUNT } from '../../../utils/cryptoKeys';
import { Alert } from '../../ui/Alert';
diff --git a/app/src/components/settings/panels/__tests__/RecoveryPhrasePanel.custody.test.tsx b/app/src/components/settings/panels/__tests__/RecoveryPhrasePanel.custody.test.tsx
index 34b7010f75..194bfd922f 100644
--- a/app/src/components/settings/panels/__tests__/RecoveryPhrasePanel.custody.test.tsx
+++ b/app/src/components/settings/panels/__tests__/RecoveryPhrasePanel.custody.test.tsx
@@ -47,9 +47,10 @@ const {
mockPersistLocalWalletFromMnemonic,
mockRevealRecoveryPhrase,
} = vi.hoisted(() => ({
- mockGenerateMnemonicPhrase: vi.fn<
- () => string | { phrase: string; wordCount: number }
- >(() => ({ phrase: '', wordCount: 12 })),
+ mockGenerateMnemonicPhrase: vi.fn<() => string | { phrase: string; wordCount: number }>(() => ({
+ phrase: '',
+ wordCount: 12,
+ })),
mockValidateRecoveryPhrase: vi.fn(async () => true),
mockFetchWalletStatus: vi.fn(async () => ({}) as WalletStatus),
mockPersistLocalWalletFromMnemonic: vi.fn(async (_args: unknown) => undefined),
diff --git a/app/src/components/settings/panels/__tests__/RecoveryPhrasePanel.test.tsx b/app/src/components/settings/panels/__tests__/RecoveryPhrasePanel.test.tsx
index a76f4d39a1..0df528a13a 100644
--- a/app/src/components/settings/panels/__tests__/RecoveryPhrasePanel.test.tsx
+++ b/app/src/components/settings/panels/__tests__/RecoveryPhrasePanel.test.tsx
@@ -13,9 +13,7 @@ const {
mockPersistLocalWalletFromMnemonic,
mockRevealRecoveryPhrase,
} = vi.hoisted(() => ({
- mockGenerateMnemonicPhrase: vi.fn<
- () => string | { phrase: string; wordCount: number }
- >(() => ({
+ mockGenerateMnemonicPhrase: vi.fn<() => string | { phrase: string; wordCount: number }>(() => ({
phrase: 'word1 word2 word3 word4 word5 word6 word7 word8 word9 word10 word11 word12',
wordCount: 12,
})),
@@ -635,9 +633,10 @@ describe('RecoveryPhrasePanel — import mode word inputs and valid/invalid styl
it('filling a valid BIP39 phrase and saving shows the valid-phrase banner then persists', async () => {
let finishPersist!: () => void;
mockPersistLocalWalletFromMnemonic.mockImplementationOnce(
- () => new Promise<void>(resolve => {
- finishPersist = resolve;
- })
+ () =>
+ new Promise<void>(resolve => {
+ finishPersist = resolve;
+ })
);
renderWithProviders(<RecoveryPhrasePanel />);