Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add new keyring type for oneKey #5216

Merged
merged 2 commits into from
Feb 12, 2025
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import type { SnapControllerState } from '@metamask/snaps-controllers';
import { SnapStatus } from '@metamask/snaps-utils';
import type { CaipChainId } from '@metamask/utils';
import * as uuid from 'uuid';

Check warning on line 23 in packages/accounts-controller/src/AccountsController.test.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Lint (20.x)

No exported names found in module 'uuid'
import type { V4Options } from 'uuid';

import type {
Expand Down Expand Up @@ -1875,6 +1875,7 @@
KeyringTypes.simple,
KeyringTypes.hd,
KeyringTypes.trezor,
KeyringTypes.oneKey,
KeyringTypes.ledger,
KeyringTypes.lattice,
KeyringTypes.qr,
Expand Down
3 changes: 3 additions & 0 deletions packages/accounts-controller/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
case KeyringTypes.trezor: {
return 'Trezor';
}
case KeyringTypes.oneKey: {
return 'OneKey';
}
case KeyringTypes.ledger: {
return 'Ledger';
}
Expand All @@ -46,7 +49,7 @@
}

/**
* Generates a UUID v4 options from a given Ethereum address.

Check warning on line 52 in packages/accounts-controller/src/utils.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Lint (20.x)

Expected 1 lines after block description
* @param address - The Ethereum address to generate the UUID from.
* @returns The UUID v4 options.
*/
Expand All @@ -61,7 +64,7 @@
}

/**
* Generates a UUID from a given Ethereum address.

Check warning on line 67 in packages/accounts-controller/src/utils.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Lint (20.x)

Expected 1 lines after block description
* @param address - The Ethereum address to generate the UUID from.
* @returns The generated UUID.
*/
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
Loading