Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Add Live Derivation path for Ledger #80

Open
0xclem opened this issue Nov 18, 2019 · 3 comments
Open

Add Live Derivation path for Ledger #80

0xclem opened this issue Nov 18, 2019 · 3 comments
Assignees

Comments

@0xclem
Copy link
Contributor

0xclem commented Nov 18, 2019

Ledger derives ETH addresses from two different paths:

  • Ledger Live: m/44'/60'/0'/0
  • Chrome apps/ Mew: m/44'/60'/0'

Right now we're only using Chrome/MEW. Ledger Live derivation needs to be added.
I've recently made the change into synthetix-js so the Ledger constructor is able to take a custom derivation path parameter.

const LEDGER_DERIVATION_PATH = "44'/60'/0'/";

class LedgerSigner extends Signer {
  constructor({ provider, chainId, addressIndex, derivationPath } = {}) {
    super();
     ...
    this.derivationPath = derivationPath || LEDGER_DERIVATION_PATH;
  }

So it is now possible to do something like:

const signer = new snxJSConnector.signers['Ledger']({derivationPath: 'xx/xx/xx'})

Here's the design which means to be implemented in the Wallet selection screen:

Screen Shot 2019-11-18 at 1 57 28 pm

@0xclem
Copy link
Contributor Author

0xclem commented Nov 18, 2019

@bachstatter I would say this one is probably highest priority as we've got lots of users asking for it in Discord.

@0xclem
Copy link
Contributor Author

0xclem commented Nov 18, 2019

Screen Shot 2019-11-18 at 2 11 35 pm

@bachstatter here's the copy (I don't think it needs translation).

@0xjocke
Copy link
Contributor

0xjocke commented Nov 20, 2019

I've tested minted and burning on both page one and page 2 with a trezor and it all seems to work fine!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants