Skip to content

Commit

Permalink
Remove 'Keep me logged in' when sigining a trx. Caused active key sig…
Browse files Browse the repository at this point in the history
…n in to fail. (Close steemit#198)
  • Loading branch information
James Calfee committed Aug 30, 2016
1 parent 2d60713 commit 56e9f46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions app/components/modules/LoginForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,11 @@ class LoginForm extends Component {
{loginBroadcastOperation && <div>
<div className="info">This operation requires your {authType} key (or use your master password).</div>
</div>}
<div>
{!loginBroadcastOperation && <div>
<label htmlFor="saveLogin">
Keep me logged in &nbsp;
<input id="saveLogin" type="checkbox" ref="pw" {...saveLogin.props} onChange={this.saveLoginToggle} disabled={submitting} /></label>
</div>
</div>}
<br />
<div>
<button type="submit" disabled={submitting || disabled} className="button">
Expand Down Expand Up @@ -263,10 +263,9 @@ export default connect(
if (loginBroadcastOperation) {
const {type, operation, successCallback, errorCallback} = loginBroadcastOperation.toJS()
dispatch(transaction.actions.broadcastOperation({type, operation, username, password, successCallback, errorCallback}))
dispatch(user.actions.usernamePasswordLogin({username, password, saveLogin, afterLoginRedirectToAccount, operationType: type}))
if (!saveLogin) {
dispatch(user.actions.closeLogin())
}
// Avoid saveLogin, this could be a user-provided content page and the login might be an active key. Security will reject that...
dispatch(user.actions.usernamePasswordLogin({username, password, saveLogin: false, afterLoginRedirectToAccount, operationType: type}))
dispatch(user.actions.closeLogin())
} else {
dispatch(user.actions.usernamePasswordLogin({username, password, saveLogin, afterLoginRedirectToAccount}))
}
Expand Down
2 changes: 1 addition & 1 deletion app/components/modules/PromotePost.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class PromotePost extends Component {
// }

render() {
const {amount, asset, loading, amountError, trxError} = this.state;
const {amount, loading, amountError, trxError} = this.state;
const {currentAccount} = this.props;
const balanceValue = currentAccount.get('sbd_balance');
const balance = balanceValue ? balanceValue.split(' ')[0] : 0.0;
Expand Down

0 comments on commit 56e9f46

Please sign in to comment.