How to use the @ledgerhq/ledger-core.createWallet function in @ledgerhq/ledger-core

To help you get started, we’ve selected a few @ledgerhq/ledger-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LedgerHQ / ledger-live-desktop / alix.js View on Github external
async function getOrCreateWallet(currencyId) {
  try {
    const wallet = await getWallet(currencyId)
    return wallet
  } catch (err) {
    const currency = await getCurrency(currencyId)
    const wallet = await createWallet(currencyId, currency)
    return wallet
  }
}