diff --git a/src/store/actions.js b/src/store/actions.js index f5682b0df..fa9ae7f26 100644 --- a/src/store/actions.js +++ b/src/store/actions.js @@ -255,7 +255,7 @@ export default { dispatch('subscribeToControllers') commit('setUserInfo', userInfo) - const selectedAddress = `0x${privateToAddress(Buffer.from(privateKey.padStart(64, '0'), 'hex')).toString('hex')}` + const selectedAddress = `0x${Buffer.from(privateToAddress(Buffer.from(privateKey.padStart(64, '0'), 'hex'))).toString('hex')}` await dispatch('initTorusKeyring', { keys: [ { diff --git a/src/utils/utils.js b/src/utils/utils.js index bbc5f1e87..5fd6cb32d 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -887,7 +887,7 @@ export function generateAddressFromPubKey(point) { } export function generateAddressFromPrivateKey(privKey) { - return toChecksumAddress(normalize(privateToAddress(Buffer.from(privKey.padStart(64, '0'), 'hex')).toString('hex'))) + return toChecksumAddress(normalize(Buffer.from(privateToAddress(Buffer.from(privKey.padStart(64, '0'), 'hex'))).toString('hex'))) } export function rskToChecksumAddress(address, chainId) {