Synthetixio / synthetix-mintr

Synthetix's Mintr v2.0: Lock up SNX to mint sUSD, claim weekly SNX and sUSD rewards for staking in the system..
https://mintr.synthetix.io/
75 stars 69 forks source link

Select the ledger derivation path before getting the addresses #92

Open 0xclem opened 4 years ago

0xclem commented 4 years ago

Right now we default the derivation path to m/44/60/0/0 and grab the addresses, which might be frustrating for Live derivation path users.

Let's default the dropdown with "Please select a derivation path" and once it's chosen we run the getNextAddresses() function.

We could also have a save button to remember the user's choice next time (saving it in the cache).

0xjocke commented 4 years ago

I would think defaulting is fine and then everytime they pick we save it to localstorage?

Up do you, I can obv make it default to unselected

0xclem commented 4 years ago

@bachstatter Yeah I guess it's fine loading the wrong derivation path for the first time.

0xclem commented 4 years ago

@bachstatter though I just found out if I refresh and "ledger live" is selected by default, it will load the wrong derivation path.

0xclem commented 4 years ago

Maybe we could write some tests to make sure we init Trezor and Ledger with the correct params, regarding the derivation path, what is save in the cache...etc. What do you think?