Skip to content

Conversation

rhyslbw
Copy link
Member

@rhyslbw rhyslbw commented Sep 17, 2025

Context

Continues the support for Trezor derivationType in the web-extension interface

@rhyslbw rhyslbw requested a review from mkazlauskas September 17, 2025 12:25
@rhyslbw rhyslbw marked this pull request as draft September 17, 2025 12:40
@rhyslbw rhyslbw force-pushed the feat/web-extension-derivation-type branch from 0f06b37 to 0389e54 Compare September 17, 2025 12:53
@rhyslbw rhyslbw marked this pull request as ready for review September 17, 2025 13:15
mkazlauskas
mkazlauskas previously approved these changes Sep 17, 2025
Copy link
Member

@mkazlauskas mkazlauskas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just some minor concerns 👇

…d Trezor types

- Split HardwareWallet into LedgerHardwareWallet and TrezorHardwareWallet
- Maintains backward compatibility through union type
- Prepares for wallet-specific configuration support
@rhyslbw rhyslbw force-pushed the feat/web-extension-derivation-type branch from deea40f to 2ed63c0 Compare September 17, 2025 18:02
- Add trezorConfig to wallet metadata for TrezorHardwareWallet
- Update SigningCoordinator to read trezorConfig from wallet.metadata
- Add minimal test to verify trezorConfig functionality
- Ensures trezorConfig can be updated via wallet manager and persists properly
- Supports both wallet-specific trezorConfig and global hwOptions fallback
@rhyslbw rhyslbw force-pushed the feat/web-extension-derivation-type branch from 2ed63c0 to 895453d Compare September 17, 2025 20:39
…nator#signRequest

- Extract #findAccount method for account lookup logic
- Extract #createInMemorySignRequest for in-memory wallet sign requests
- Extract #createHardwareSignRequest for hardware wallet sign requests
- Extract #createHardwareKeyAgent for key agent creation logic
- Replace complex nested ternary with simple conditional
- Add proper TypeScript types for Bip32WalletAccount
- Remove eslint-disable comment for cognitive complexity
- Maintain exact same functionality while improving readability
@rhyslbw rhyslbw force-pushed the feat/web-extension-derivation-type branch from 895453d to 34d9d35 Compare September 17, 2025 20:43
@rhyslbw rhyslbw marked this pull request as ready for review September 17, 2025 22:15
Copy link
Member

@mkazlauskas mkazlauskas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! 🚀

request: Omit<Req, 'reject' | 'sign'>,
sign: (keyAgent: KeyAgent) => Promise<R>
) {
/* eslint-disable sonarjs/cognitive-complexity */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@rhyslbw rhyslbw merged commit 5f60e89 into master Sep 18, 2025
10 of 12 checks passed
@rhyslbw rhyslbw deleted the feat/web-extension-derivation-type branch September 18, 2025 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants