spacesuit-extension / SpaceSuit

A MetaMask-compatible Chrome extension to enable Ledger Wallets to use Ethereum Dapps
MIT License
26 stars 2 forks source link

Accessing Additional Addresses #18

Open AusIV opened 6 years ago

AusIV commented 6 years ago

In Metamask, you only get web3.eth.accounts[0]. If you switch accounts, the new account becomes web3.eth.accounts[0], and you still only have 1.

With SpaceSuit, you get the first 10 accounts on your ledger, but you can't control which one is web3.eth.accounts[0]. I found myself today wanting to access web3.eth.accounts[1], but the dapp I was using (and I'll own up to it being my own dapp) is hard coded to only look at web3.eth.accounts[0].

I see a strong argument that I should just fix my dapp, but since there are other dapps I interact with where I don't have that option, it would be nice if there were a setting somewhere that would let you designate which of your ledger addresses should appear in the first slot.

jamespic commented 6 years ago

Yes, I must confess I sometimes work around this myself by switching to a custom endpoint and setting the derivation path to m/44'/60'/0'/1, since I do some stuff with my second account.

I'm about to start refactoring the derivation code for new the new derivations in Ledger Live (#12), so it might be good to do this at the same time.

The one sticky wicket is that it's not possible to actually see what the addresses are from the options screen. This is due to a stupid limitation in Chrome, that is a large part of why I ended up creating SpaceSuit rather than adding Ledger support to MetaMask. But maybe this is OK, and maybe I can find a way to make the user experience a bit better - maybe a "test these settings" button that opens a new tab (which probably means doing #6 and #15).