Skip to content

Commit

Permalink
fix: convert import to require to fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
montelaidev committed Jan 22, 2025
1 parent d76a0d8 commit 183f0b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/keyring-controller/src/KeyringController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ import { Mutex } from 'async-mutex';
import type { MutexInterface } from 'async-mutex';
import Wallet, { thirdparty as importers } from 'ethereumjs-wallet';
import type { Patch } from 'immer';
// When generating a ULID within the same millisecond, monotonicFactory provides some guarantees regarding sort order.
import { monotonicFactory } from 'ulidx';

import { KeyringControllerError } from './constants';

// When generating a ULID within the same millisecond, monotonicFactory provides some guarantees regarding sort order.
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { monotonicFactory } = require('ulidx');

const ulid = monotonicFactory();
const name = 'KeyringController';

Expand Down Expand Up @@ -1481,11 +1483,9 @@ export class KeyringController extends BaseController<
| undefined;

if (!keyring && options.createIfMissing) {
const newMetadata = { id: ulid(), name: '' };
keyring = (await this.#newKeyring(
selector.type,
options.createWithData,
newMetadata,
)) as SelectedKeyring;
}
} else if ('id' in selector) {
Expand Down

0 comments on commit 183f0b5

Please sign in to comment.