Logic changes

This commit is contained in:
Zach Fox 2017-11-08 10:40:47 -08:00
parent b7163bb8fc
commit 72fa0823ba
2 changed files with 8 additions and 19 deletions

View file

@ -218,30 +218,15 @@ Item {
size: 24; size: 24;
// Style // Style
color: hifi.colors.blueAccent; color: hifi.colors.blueAccent;
anchors.top: parent.top;
anchors.topMargin: 26;
anchors.left: parent.left; anchors.left: parent.left;
anchors.leftMargin: 12;
anchors.right: parent.right; anchors.right: parent.right;
anchors.rightMargin: 12;
anchors.verticalCenter: parent.verticalCenter;
height: paintedHeight; height: paintedHeight;
wrapMode: Text.WordWrap; wrapMode: Text.WordWrap;
horizontalAlignment: Text.AlignHCenter; horizontalAlignment: Text.AlignHCenter;
} }
// "Apply" button
HifiControlsUit.Button {
id: changePassphraseButton;
color: hifi.buttons.blue;
colorScheme: hifi.colorSchemes.dark;
anchors.top: noActivityText.bottom;
anchors.topMargin: 25;
anchors.horizontalCenter: parent.horizontalCenter;
width: 180;
height: 40;
text: "Apply Now";
onClicked: {
Qt.openUrlExternally("https://www.highfidelity.com/");
}
}
} }
ListView { ListView {

View file

@ -324,12 +324,16 @@ Wallet::Wallet() {
connect(ledger.data(), &Ledger::accountResult, this, [&]() { connect(ledger.data(), &Ledger::accountResult, this, [&]() {
auto wallet = DependencyManager::get<Wallet>(); auto wallet = DependencyManager::get<Wallet>();
auto ledger = DependencyManager::get<Ledger>();
auto walletScriptingInterface = DependencyManager::get<WalletScriptingInterface>(); auto walletScriptingInterface = DependencyManager::get<WalletScriptingInterface>();
uint status; uint status;
if (_mustRegenerateKeypair) { if (_mustRegenerateKeypair || (!_passphrase->isEmpty() && _publicKeys.count() == 0)) {
qCDebug(commerce) << "Regenerating keys and resetting user_hfc_account. _mustRegenerateKeypair:"
<< _mustRegenerateKeypair << "_publicKeys.count():" << _publicKeys.count();
_mustRegenerateKeypair = false; _mustRegenerateKeypair = false;
resetKeysOnly(); resetKeysOnly();
ledger->reset();
generateKeyPair(); generateKeyPair();
} }