Skip to content

Commit

Permalink
♻️ Fix nagivaation error after second login with HW
Browse files Browse the repository at this point in the history
  • Loading branch information
Osvaldo Vega committed Mar 29, 2019
1 parent 99c56e5 commit ffb2a7e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 13 deletions.
34 changes: 21 additions & 13 deletions src/components/hwWallet/hwWallet.js
@@ -1,12 +1,12 @@
import React from 'react';
import to from 'await-to-js';
import Box from '../box';

import UnlockWallet from './unlockWallet';
import LedgerLogin from './ledgerLoginHOC';
import getNetwork from '../../utils/getNetwork';
import { getAccountFromLedgerIndex } from '../../utils/ledger';
import Piwik from '../../utils/piwik';
import HeaderV2 from '../headerV2/headerV2';

import { loginType } from '../../constants/hwConstants';
import routes from '../../constants/routes';
Expand Down Expand Up @@ -67,21 +67,29 @@ class HwWallet extends React.Component {
render() {
if (this.state.isLedgerLogin) {
return (
<Box>
<LedgerLogin
account={this.props.account}
loginType={loginType.normal}
network={getNetwork(this.props.network)}
cancelLedgerLogin={this.cancelLedgerLogin.bind(this)} />
</Box>);
<React.Fragment>
<HeaderV2 showSettings={true} />
<div className={styles.wrapper}>
<LedgerLogin
account={this.props.account}
loginType={loginType.normal}
network={getNetwork(this.props.network)}
cancelLedgerLogin={this.cancelLedgerLogin.bind(this)} />
</div>
</React.Fragment>
);
}

return (
<Box className={styles.unlockWallet}>
<UnlockWallet
handleOnClick={this.handleOnClick.bind(this)}
cancelLedgerLogin={this.cancelLedgerLogin.bind(this)} />
</Box>);
<React.Fragment>
<HeaderV2 showSettings={true} />
<div className={`${styles.unlockWallet} ${styles.wrapper}`}>
<UnlockWallet
handleOnClick={this.handleOnClick.bind(this)}
cancelLedgerLogin={this.cancelLedgerLogin.bind(this)} />
</div>
</React.Fragment>
);
}
}

Expand Down
4 changes: 4 additions & 0 deletions src/components/hwWallet/unlockWallet.css
Expand Up @@ -32,3 +32,7 @@
flex-direction: column;
justify-content: center;
}

.wrapper {
padding: 20px;
}
1 change: 1 addition & 0 deletions src/constants/routes.js
Expand Up @@ -119,6 +119,7 @@ export default {
hwWallet: {
path: '/hw-walet-login',
component: HwWallet,
isV2Layout: true,
isPrivate: false,
},
// notFoundExplorer: {
Expand Down

0 comments on commit ffb2a7e

Please sign in to comment.