Commit 068d4e0a authored by Tomasz Drwięga's avatar Tomasz Drwięga Committed by Marek Kotewicz
Browse files

Dismiss keyboard on terminal PIN screens. (#60)

parent 9faf854f
......@@ -16,7 +16,7 @@
'use strict'
import { Alert } from 'react-native'
import { Alert, Keyboard } from 'react-native'
import { connect } from 'react-redux'
import { Actions } from 'react-native-router-flux'
import AccountPin from '../components/AccountPin'
......@@ -31,6 +31,7 @@ export const AccountEnterPin = connect(
(dispatch) => ({
onNextPressed: (pin, account) => {
if (pin === account.pin) {
Keyboard.dismiss()
dispatch(signTx(account))
} else {
Alert.alert('Invalid PIN')
......@@ -90,6 +91,8 @@ export const AccountConfirmPin = connect(
return
}
Keyboard.dismiss()
if (isNew) {
dispatch(addAccount(account))
Actions.popTo('accountList')
......
......@@ -46,8 +46,8 @@ export default function scanner (state = initialState, action) {
case RESET_SCANNER:
return {
...state,
scannerEnabled: false,
shouldDisplayWarning: false
scannerEnabled: true,
shouldDisplayWarning: true
}
default:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment