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

fix(ledger): no signer breaking homepage #5254

Merged
merged 1 commit into from
Apr 18, 2024
Merged

Conversation

kyranjamie
Copy link
Collaborator

@kyranjamie kyranjamie commented Apr 18, 2024

Try out Leather build 41a3e3dExtension build, Test report, Storybook, Chromatic

Uses Loader pattern to prevent importing hook that instantly breaks the wallet when there's no data.

Nested loaders are very ugly, and we could alternatively make a double one for both. But ugly is better than broken. We need build pages with the pattern of "Get the data you need safely via loader pattern (or another safe method), pass into your page" rather than assuming all data can be read via a hook.

Copy link
Contributor

@pete-watters pete-watters left a comment

Choose a reason for hiding this comment

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

I've tested this manually and it resolves the issue

@kyranjamie kyranjamie added this pull request to the merge queue Apr 18, 2024
Merged via the queue into dev with commit 7624c0a Apr 18, 2024
29 checks passed
@kyranjamie kyranjamie deleted the fix/ledger-broken-homepage branch April 18, 2024 10:19
@fbwoolf
Copy link
Contributor

fbwoolf commented Apr 18, 2024

@kyranjamie the native segwit address is used in other places in asset-list, shouldn't we replace those with the loader too? I think I broke this adding the taproot address for Runes, but it seems hard to understand when the ns address was already being used. It appears the useCurrentAccountNativeSegwitAddressIndexZero has a check for the signer, so that was the diff here? Should I add the loaders around the BTC asset item here and remove the deprecated useCurrentAccountNativeSegwitAddressIndexZero?

@kyranjamie
Copy link
Collaborator Author

@fbwoolf recognise it's not a very consistent pattern, and open for removing. Would love to move away from the hooks entirely to a more robust pattern.

Should I add the loaders around the BTC asset item here and remove the deprecated useCurrentAccountNativeSegwitAddressIndexZero?

Yep, sounds good. Honestly, I'd remove BitcoinFungibleTokenAssetList entirely and just handle with loaders directly in AssetList. Doesn't do anything beyond prop passing.

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.

Switching to mainnet <-> testnet network on extension with ledger device leads to error: No signer
4 participants