From 5de24e633493f35b8efbcb40879cc9c754236208 Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Sat, 11 Jul 2020 23:27:25 +0200 Subject: [PATCH] fix(wallet): ensure password lock/unlock works --- renderer/reducers/account/reducer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/renderer/reducers/account/reducer.js b/renderer/reducers/account/reducer.js index 2b02b3f18e6..40a1e1e1904 100644 --- a/renderer/reducers/account/reducer.js +++ b/renderer/reducers/account/reducer.js @@ -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') })) } /** @@ -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