The nuclear option is a bad option.

This commit is contained in:
Zach Fox 2017-11-30 15:48:57 -08:00
parent 009d3a18a3
commit 24e5994f20
4 changed files with 7 additions and 2 deletions

View file

@ -47,7 +47,7 @@ Rectangle {
} else if (walletStatus === 1) {
if (root.activeView !== "walletSetup") {
root.activeView = "walletSetup";
commerce.reset();
commerce.resetLocalWalletOnly();
}
} else if (walletStatus === 2) {
if (root.activeView !== "passphraseModal") {

View file

@ -225,7 +225,6 @@ Item {
height: 50;
text: "Set Up Wallet";
onClicked: {
commerce.account();
root.activeView = "step_2";
}
}

View file

@ -128,6 +128,11 @@ void QmlCommerce::reset() {
wallet->reset();
}
void QmlCommerce::resetLocalWalletOnly() {
auto wallet = DependencyManager::get<Wallet>();
wallet->reset();
}
void QmlCommerce::account() {
auto ledger = DependencyManager::get<Ledger>();
ledger->account();

View file

@ -65,6 +65,7 @@ protected:
Q_INVOKABLE void history();
Q_INVOKABLE void generateKeyPair();
Q_INVOKABLE void reset();
Q_INVOKABLE void resetLocalWalletOnly();
Q_INVOKABLE void account();
Q_INVOKABLE void certificateInfo(const QString& certificateId);