1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-29 07:16:36 +01:00
metamask-extension/ui/app/pages/create-account/connect-hardware
Mark Stacey 87d181b347
Fix hardware account selection (#10198)
Fixes #9244

When trying to connect a Trezor account on a fresh install of MetaMask,
the radio buttons on the account selection page would not respond to
being clicked.

When debugging this, it looks like the `onChange` event was never
triggered. A radio `<input>` element should trigger `onChange` whenever
the selection state change, but seemingly this wouldn't happen if the
change in selection state was undone during the same render cycle. If
I paused at a breakpoint during the render, I could see the checkbox
get selected then unselected again without triggering `onChange`.

The simplest fix was to use `onClick` instead of `onChange`. This seems
more appropriate anyway because we're treating the radio button as a
controlled component here, so the state of the underlying element isn't
really of any concern.
2021-01-18 12:46:24 -03:30
..
account-list.js Fix hardware account selection (#10198) 2021-01-18 12:46:24 -03:30
index.js Include error string from ledger errors (#9911) 2020-11-19 07:35:20 -08:00
index.scss Revert "Add custom hd path option (#9367)" (#9875) 2020-11-13 14:25:47 -03:30
select-hardware.js Provide alternative text for images where appropriate 2020-11-11 09:38:15 -06:00