Skip to content

Ledger Support for Electron Apps

Compare
Choose a tag to compare
@lnbc1QWFyb24 lnbc1QWFyb24 released this 18 Mar 07:33
2cac2af

This release adds support for Ledger wallets in Electron apps via an additional LedgerTransport property on the Ledger initialization object. For Ledger to work on Electron apps it needs to use the node transport module.

So to get this working in your Electron app you will need to install the node transport module, require it and then pass it in when initializing Onboard:

const TransportNodeHid = require("@ledgerhq/hw-transport-node-hid").default;

const onboardConfig = {
  // other config options...
  wallets: [
    // other wallets...
    {
       walletName: "ledger",
       rpcUrl: `https://rinkeby.infura.io/v3/${infuraKey}`,
       LedgerTransport: TransportNodeHid
    }
  ]
}

A small UI enhancement is also included in this release which makes all modals disable window scrolling so that a user can't scroll below the modal.

Changelog:

  • Make modal fixed and lock scrolling (#247)
  • Add custom ledger transport option (#249)
  • Add types to originalOverflowValue (#251)