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

Commit

Permalink
fix(wallet): ensure password lock/unlock works
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfelton committed Jul 13, 2020
1 parent edda5a9 commit 5de24e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions renderer/reducers/account/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const initAccount = () => async dispatch => {
*/
const setPassword = password => async dispatch => {
const { sha256digest } = window.Zap
dispatch(waitForIpcEvent('setPassword', { value: await sha256digest(password) }))
dispatch(waitForIpcEvent('setPassword', { value: await sha256digest(password, 'hex') }))
}

/**
Expand All @@ -114,7 +114,7 @@ const setPassword = password => async dispatch => {
const requirePassword = password => async dispatch => {
const { sha256digest } = window.Zap
const { password: hash } = await dispatch(waitForIpcEvent('getPassword'))
const passwordHash = await sha256digest(password)
const passwordHash = await sha256digest(password, 'hex')
// compare hash received from the main thread to a hash of a password provided
if (hash === passwordHash) {
return true
Expand Down

0 comments on commit 5de24e6

Please sign in to comment.