Skip to content

Commit

Permalink
Fixes whitespace when doing restore
Browse files Browse the repository at this point in the history
  • Loading branch information
NejcZdovc committed Dec 21, 2018
1 parent 2bd242d commit f5a3d09
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions components/brave_rewards/resources/ui/reducers/wallet_reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,25 @@ const walletReducer: Reducer<Rewards.State | undefined> = (state: Rewards.State,
}
break
case types.RECOVER_WALLET:
if (!action.payload.key || action.payload.key.length === 0) {
let ui = state.ui
ui.walletRecoverySuccess = false
{
let key = action.payload.key
key = key.trim()

state = {
...state,
ui
if (!key || key.length === 0) {
let ui = state.ui
ui.walletRecoverySuccess = false

state = {
...state,
ui
}

break
}

chrome.send('brave_rewards.recoverWallet', [key])
break
}

chrome.send('brave_rewards.recoverWallet', [action.payload.key])
break
case types.ON_RECOVER_WALLET_DATA:
{
state = { ...state }
Expand Down

0 comments on commit f5a3d09

Please sign in to comment.