Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #591 from LiskHQ/590-login-page-issue
Browse files Browse the repository at this point in the history
Fix login issues- Closes #590
  • Loading branch information
reyraa authored Aug 10, 2017
2 parents b670d62 + eab49e4 commit 30865ca
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/store/reducers/account.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { deepEquals } from '../../utils/polyfills';
import actionTypes from '../../constants/actions';
import { extractPublicKey, extractAddress } from '../../utils/api/account';

/**
* If the new value of the given property on the account is changed,
Expand Down Expand Up @@ -38,17 +37,9 @@ const merge = (account, info) => {
const updatedAccount = Object.assign({}, account);

keys.forEach((key) => {
changes = setChangedItem(account, changes, key, info[key]);
updatedAccount[key] = info[key];

if (key === 'passphrase') {
const publicKey = extractPublicKey(info[key]);
changes = setChangedItem(account, changes, 'publicKey', publicKey);
updatedAccount.publicKey = publicKey;

const address = extractAddress(publicKey);
changes = setChangedItem(account, changes, 'address', address);
updatedAccount.address = address;
if (info[key]) {
changes = setChangedItem(account, changes, key, info[key]);
updatedAccount[key] = info[key];
}
});

Expand Down

0 comments on commit 30865ca

Please sign in to comment.