Skip to content

Commit

Permalink
fix(keyring-controller): await generateRandomMnemonic explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
ccharly committed Jan 6, 2025
1 parent 89c04a1 commit 865cff8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/keyring-controller/src/KeyringController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2199,7 +2199,10 @@ export class KeyringController extends BaseController<
);
}

keyring.generateRandomMnemonic();
// NOTE: Not all keyrings implement this method in a asynchronous-way. Using `await` for
// non-thenable will still be valid (despite not being really useful). It allows us to cover both
// cases and allow retro-compatibility too.
await keyring.generateRandomMnemonic();
await keyring.addAccounts(1);
}

Expand Down

0 comments on commit 865cff8

Please sign in to comment.