Merge pull request #11739 from zfox23/commerce_setPassphraseWhenLogout

Reset Wallet passphrase when login username changes
This commit is contained in:
Zach Fox 2017-11-02 19:46:00 -07:00 committed by GitHub
commit 35343da281
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -86,7 +86,7 @@ Rectangle {
root.dateOfPurchase = "";
root.itemEdition = "Uncertified Copy";
errorText.text = "The certificate associated with this entity is invalid.";
errorText.text = "The information associated with this item has been modified and it no longer matches the original certified item.";
errorText.color = hifi.colors.baseGray;
} else if (certStatus === 4) { // CERTIFICATE_STATUS_OWNER_VERIFICATION_FAILED
root.isCertificateInvalid = true;
@ -99,7 +99,7 @@ Rectangle {
root.dateOfPurchase = "";
root.itemEdition = "Uncertified Copy";
errorText.text = "The certificate associated with this entity is invalid.";
errorText.text = "The avatar who rezzed this item doesn't own it.";
errorText.color = hifi.colors.baseGray;
} else {
console.log("Unknown certificate status received from ledger signal!");

View file

@ -31,6 +31,11 @@ QmlCommerce::QmlCommerce(QQuickItem* parent) : OffscreenQmlDialog(parent) {
connect(wallet.data(), &Wallet::walletStatusResult, this, &QmlCommerce::walletStatusResult);
connect(ledger.data(), &Ledger::certificateInfoResult, this, &QmlCommerce::certificateInfoResult);
connect(ledger.data(), &Ledger::updateCertificateStatus, this, &QmlCommerce::updateCertificateStatus);
auto accountManager = DependencyManager::get<AccountManager>();
connect(accountManager.data(), &AccountManager::usernameChanged, [&]() {
setPassphrase("");
});
}
void QmlCommerce::getWalletStatus() {