Skip to content

Commit

Permalink
feat: add dedicated OneKey keyring class
Browse files Browse the repository at this point in the history
  • Loading branch information
Akaryatrh committed Jan 30, 2025
1 parent b0715fb commit b7350f6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/keyring-eth-trezor/src/trezor-keyring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ const ALLOWED_HD_PATHS = {
[SLIP0044TestnetPath]: true,
} as const;

const keyringType = 'Trezor Hardware';
const trezorKeyringType = 'Trezor Hardware';
const oneKeyKeyringType = 'OneKey Hardware';
const pathBase = 'm';
const MAX_INDEX = 1000;
const DELAY_BETWEEN_POPUPS = 1000;
Expand Down Expand Up @@ -85,9 +86,9 @@ function isOldStyleEthereumjsTx(
}

export class TrezorKeyring extends EventEmitter {
static type: string = keyringType;
static type: string = trezorKeyringType;

readonly type: string = keyringType;
readonly type: string = trezorKeyringType;

accounts: readonly string[] = [];

Expand Down Expand Up @@ -578,3 +579,9 @@ export class TrezorKeyring extends EventEmitter {
return `${this.hdPath}/${index}`;
}
}

export class OneKeyKeyring extends TrezorKeyring {
static type: string = oneKeyKeyringType;

readonly type: string = oneKeyKeyringType;
}

0 comments on commit b7350f6

Please sign in to comment.