53 lines
1.2 KiB
QML
Raw Normal View History

2020-06-17 15:18:31 -04:00
import QtQuick 2.13
import QtQuick.Controls 2.13
import utils 1.0
import "../popups"
import "../stores"
import "../shared"
2020-06-12 16:47:44 -04:00
Item {
property var onClosed: function () {}
signal showCreatePasswordView()
2020-06-12 16:47:44 -04:00
id: existingKeyView
anchors.fill: parent
2020-06-12 16:47:44 -04:00
Component.onCompleted: {
enterSeedPhraseModal.open()
}
2020-06-12 16:47:44 -04:00
EnterSeedPhraseModal {
property bool wentNext: false
id: enterSeedPhraseModal
onConfirmSeedClick: function (mnemonic) {
wentNext = true
enterSeedPhraseModal.close()
OnboardingStore.importMnemonic(mnemonic)
recoverySuccessModal.open()
}
2020-06-12 16:47:44 -04:00
onClosed: function () {
if (!wentNext) {
existingKeyView.onClosed()
}
}
}
MnemonicRecoverySuccessModal {
property bool wentNext: false
id: recoverySuccessModal
onButtonClicked: {
recoverySuccessModal.wentNext = true
recoverySuccessModal.close()
showCreatePasswordView()
}
onClosed: function () {
if (!recoverySuccessModal.wentNext) {
existingKeyView.onClosed()
}
}
}
}