Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion app/scripts/fixtures/generate-wallet-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
import { KeyringController } from '@metamask/keyring-controller';
import { wordlist } from '@metamask/scure-bip39/dist/wordlists/english';
import { cloneDeep } from 'lodash';
import { hexToDecimal } from '../../../shared/modules/conversion.utils';

Check failure on line 5 in app/scripts/fixtures/generate-wallet-state.js

View workflow job for this annotation

GitHub Actions / test-lint / Test lint

`../../../shared/modules/conversion.utils` import should occur after import of `ethereumjs-util`
import { v4 as uuid } from 'uuid';

Check failure on line 6 in app/scripts/fixtures/generate-wallet-state.js

View workflow job for this annotation

GitHub Actions / test-lint / Test lint

'uuid' is defined but never used
import { sha256FromString } from 'ethereumjs-util';

Check failure on line 7 in app/scripts/fixtures/generate-wallet-state.js

View workflow job for this annotation

GitHub Actions / test-lint / Test lint

'sha256FromString' is defined but never used
import { UI_NOTIFICATIONS } from '../../../shared/notifications';
import { WALLET_PASSWORD } from '../../../test/e2e/constants';
import { E2E_SRP, defaultFixture } from '../../../test/e2e/default-fixture';
import { defaultFixture } from '../../../test/e2e/default-fixture';
import FixtureBuilder from '../../../test/e2e/fixture-builder';
import { encryptorFactory } from '../lib/encryptor-factory';
import { normalizeSafeAddress } from '../lib/multichain/address';
Expand Down Expand Up @@ -35,8 +37,12 @@
FIXTURES_CONFIG = withState;
}

// This SRP has 30 accounts each with a Solana account
const TEST_SRP =

Check failure on line 41 in app/scripts/fixtures/generate-wallet-state.js

View workflow job for this annotation

GitHub Actions / test-lint / Test lint

'TEST_SRP' is assigned a value but never used
'stock grab suspect keep column cover plate grape assault patrol pistol wire';

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Fix Constant Mismatch

A new TEST_SRP constant is defined but never used. Line 45 still references the undefined E2E_SRP instead, which will cause a runtime error because E2E_SRP was removed from the imports. The code should use the TEST_SRP constant instead of E2E_SRP on line 45.

Fix in Cursor Fix in Web

const { vault, accounts } = await generateVaultAndAccount(
process.env.TEST_SRP || E2E_SRP,

Check failure on line 45 in app/scripts/fixtures/generate-wallet-state.js

View workflow job for this annotation

GitHub Actions / test-lint / Test lint

'E2E_SRP' is not defined
fromTest ? WALLET_PASSWORD : process.env.PASSWORD,
);

Expand Down
Loading
Loading