Skip to content

Commit

Permalink
chore(wallet): allow enter to submit form (#1200)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurice Dalderup authored Oct 20, 2019
1 parent 0899d38 commit 1d9e040
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
10 changes: 3 additions & 7 deletions src/renderer/shared/components/NewWallet/Ledger/Ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ export default class Ledger extends React.PureComponent {

render() {
return (
<div className={styles.ledgerView}>
<form className={styles.ledgerView} onSubmit={this.confirm}>
{this.renderComponent()}
{this.renderActions()}
</div>
</form>
);
}

Expand Down Expand Up @@ -198,11 +198,7 @@ export default class Ledger extends React.PureComponent {
<Button className={styles.action} onClick={onCancel}>
Cancel
</Button>
<PrimaryButton
className={styles.action}
disabled={!this.isValid()}
onClick={this.confirm}
>
<PrimaryButton className={styles.action} disabled={!this.isValid()}>
Add Wallet
</PrimaryButton>
</div>
Expand Down
8 changes: 3 additions & 5 deletions src/renderer/shared/components/NewWallet/Mnemonic/Mnemonic.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class Mnemonic extends React.PureComponent {
const { secretWord } = account;

return (
<div className={classNames(className, styles.mnemonic)}>
<form className={classNames(className, styles.mnemonic)} onSubmit={this.confirm}>
<Pill>{secretWord}</Pill>
<LabeledInput
id="passphrase"
Expand All @@ -56,11 +56,9 @@ export default class Mnemonic extends React.PureComponent {
<Button className={styles.action} onClick={this.cancel}>
Cancel
</Button>
<PrimaryButton className={styles.action} onClick={this.confirm}>
Add Wallet
</PrimaryButton>
<PrimaryButton className={styles.action}>Add Wallet</PrimaryButton>
</div>
</div>
</form>
);
}

Expand Down

0 comments on commit 1d9e040

Please sign in to comment.