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

Commit

Permalink
fix(lnd): handle seed generation error
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfelton committed Jan 16, 2019
1 parent 0971c70 commit ebde306
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions app/reducers/lnd.js
Expand Up @@ -263,14 +263,18 @@ export const setUnlockWalletError = (event, unlockWalletError) => dispatch => {

export const fetchSeed = () => async dispatch => {
dispatch({ type: FETCH_SEED })
await dispatch(
startLnd({
id: `tmp`,
type: 'local',
chain: 'bitcoin',
network: 'testnet'
})
)
try {
await dispatch(
startLnd({
id: `tmp`,
type: 'local',
chain: 'bitcoin',
network: 'testnet'
})
)
} catch (error) {
dispatch({ type: FETCH_SEED_ERROR, error })
}
}

// Listener for when LND creates and sends us a generated seed
Expand Down

0 comments on commit ebde306

Please sign in to comment.