Skip to content

Commit

Permalink
feat: add new keyring type for oneKey
Browse files Browse the repository at this point in the history
  • Loading branch information
Akaryatrh committed Feb 7, 2025
1 parent 0d62854 commit 4893887
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1875,6 +1875,7 @@ describe('AccountsController', () => {
KeyringTypes.simple,
KeyringTypes.hd,
KeyringTypes.trezor,
KeyringTypes.oneKey,
KeyringTypes.ledger,
KeyringTypes.lattice,
KeyringTypes.qr,
Expand Down
5 changes: 4 additions & 1 deletion packages/accounts-controller/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { v4 as uuid } from 'uuid';
* @param keyringType - The type of the keyring.
* @returns The name of the keyring type.
*/
export function keyringTypeToName(keyringType: string): string {
export function keyringTypeToName(keyringType: KeyringTypes): string {
// Custody keyrings are a special case, as they are not a single type
// they just start with the prefix `Custody`
if (isCustodyKeyring(keyringType)) {
Expand All @@ -27,6 +27,9 @@ export function keyringTypeToName(keyringType: string): string {
case KeyringTypes.trezor: {
return 'Trezor';
}
case KeyringTypes.oneKey: {
return 'OneKey';
}
case KeyringTypes.ledger: {
return 'Ledger';
}
Expand Down
1 change: 1 addition & 0 deletions packages/keyring-controller/src/KeyringController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export enum KeyringTypes {
hd = 'HD Key Tree',
qr = 'QR Hardware Wallet Device',
trezor = 'Trezor Hardware',
oneKey = 'OneKey Hardware',
ledger = 'Ledger Hardware',
lattice = 'Lattice Hardware',
snap = 'Snap Keyring',
Expand Down

0 comments on commit 4893887

Please sign in to comment.