Move irrelevant stuff out of try block
This commit is contained in:
@@ -26,13 +26,14 @@ export default class PasswordPrompt extends Component {
|
|||||||
async tryToOpenDb() {
|
async tryToOpenDb() {
|
||||||
try {
|
try {
|
||||||
await openDb({ persistConnection: true })
|
await openDb({ persistConnection: true })
|
||||||
await saveEncryptionFlag(false)
|
|
||||||
this.props.showApp()
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.setState({ showPasswordPrompt: true })
|
this.setState({ showPasswordPrompt: true })
|
||||||
await saveEncryptionFlag(true)
|
await saveEncryptionFlag(true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await saveEncryptionFlag(false)
|
||||||
|
this.props.showApp()
|
||||||
}
|
}
|
||||||
|
|
||||||
passHashToDb = async hash => {
|
passHashToDb = async hash => {
|
||||||
|
|||||||
Reference in New Issue
Block a user