1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/app
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
..
components Disable swaps based on chainId, instead of network id (#10155) 2021-01-07 13:29:32 -03:30
contexts add new MetaMetricsController (#9857) 2020-12-02 15:41:30 -06:00
css Use 1px borders on inputs and buttons (#9766) 2020-10-30 13:31:42 -05:00
ducks improve handling of last selected provider (#10093) 2021-01-06 17:31:11 -06:00
helpers Fix eth-method-registry import (#10183) 2021-01-12 20:29:47 -08:00
hooks Fix useTransactionDisplayData unit tests (#10134) 2021-01-04 09:45:54 -08:00
pages Fix hardware account selection (#10198) 2021-01-18 12:46:24 -03:30
selectors Add web3 shim usage notification (#10039) 2020-12-10 15:40:29 -08:00
store improve handling of last selected provider (#10093) 2021-01-06 17:31:11 -06:00