diff --git a/interface/resources/qml/hifi/commerce/wallet/Help.qml b/interface/resources/qml/hifi/commerce/wallet/Help.qml
index e38f23e5a5..1c37ded4ee 100644
--- a/interface/resources/qml/hifi/commerce/wallet/Help.qml
+++ b/interface/resources/qml/hifi/commerce/wallet/Help.qml
@@ -64,7 +64,7 @@ Item {
answer: "High Fidelity commerce is in open beta right now. Want more HFC? \
Get it by going to
BankOfHighFidelity. and meeting with the banker!";
}
- ListElement {
+ /* ListElement {
isExpanded: false;
question: "What are private keys and where are they stored?";
answer:
@@ -74,16 +74,16 @@ After wallet setup, a hifikey file is stored on your computer in High Fidelity I
Your hifikey file contains your private key and is protected by your wallet passphrase. \
It is very important to back up your hifikey file! \
Tap here to open the folder where your HifiKeys are stored on your main display."
- }
- ListElement {
+ }*/
+ /*ListElement {
isExpanded: false;
question: "How do I back up my private keys?";
answer: "You can back up your hifikey file (which contains your private key and is encrypted using your wallet passphrase) by copying it to a USB flash drive, or to a service like Dropbox or Google Drive. \
Restore your hifikey file by replacing the file in Interface's AppData directory with your backup copy. \
Others with access to your back up should not be able to spend your HFC without your passphrase. \
Tap here to open the folder where your HifiKeys are stored on your main display.";
- }
- ListElement {
+ }*/
+ /*ListElement {
isExpanded: false;
question: "What happens if I lose my private keys?";
answer: "We cannot stress enough that you should keep a backup! For security reasons, High Fidelity does not keep a copy, and cannot restore it for you. \
@@ -94,8 +94,8 @@ Here are some things to try:
\
- If you are a developer and have installed multiple builds of High Fidelity, your hifikey file might be in another folder
\
As a last resort, you can set up your Wallet again and generate a new hifikey file. \
Unfortunately, this means you will start with 0 HFC and your purchased items will not be transferred over.";
- }
- ListElement {
+ }*/
+ /*ListElement {
isExpanded: false;
question: "What if I forget my wallet passphrase?";
answer: "Your wallet passphrase is used to encrypt your private keys. Please write it down and store it securely! \
@@ -104,7 +104,7 @@ You will also no longer have access to the contents of your Wallet or My Purchas
For security reasons, High Fidelity does not keep a copy of your passphrase, and can't restore it for you. \
If you still cannot remember your wallet passphrase, you can set up your Wallet again and generate a new hifikey file. \
Unfortunately, this means you will start with 0 HFC and your purchased items will not be transferred over.";
- }
+ }*/
ListElement {
isExpanded: false;
question: "How do I send HFC to other people?";
@@ -116,7 +116,7 @@ In your Wallet's Send Money tab, choose from your list of connections, or choose
question: "What is a Security Pic?"
answer: "Your Security Pic acts as an extra layer of Wallet security. \
When you see your Security Pic, you know that your actions and data are securely making use of your account. \
-Tap here to change your Security Pic.";
+
Tap here to change your Security Pic.";
}
ListElement {
isExpanded: false;
@@ -259,7 +259,6 @@ At the moment, there is currently no way to convert HFC to other currencies. Sta
} else if (link === "#support") {
Qt.openUrlExternally("mailto:support@highfidelity.com");
} else if (link === "#securitypic") {
- console.log("HRS FIXME here");
sendSignalToWallet({method: 'walletSecurity_changeSecurityImage'});
}
}
diff --git a/interface/resources/qml/hifi/commerce/wallet/Security.qml b/interface/resources/qml/hifi/commerce/wallet/Security.qml
index 216d621bf8..08eb94a23c 100644
--- a/interface/resources/qml/hifi/commerce/wallet/Security.qml
+++ b/interface/resources/qml/hifi/commerce/wallet/Security.qml
@@ -88,6 +88,7 @@ Item {
color: hifi.colors.faintGray;
}
+ /*
Item {
id: changePassphraseContainer;
anchors.top: securityTextSeparator.bottom;
@@ -154,10 +155,11 @@ Item {
// Style
color: hifi.colors.faintGray;
}
+ */
Item {
id: changeSecurityImageContainer;
- anchors.top: changePassphraseSeparator.bottom;
+ anchors.top: securityTextSeparator.bottom; // changePassphraseSeparator.bottom;
anchors.topMargin: 8;
anchors.left: parent.left;
anchors.leftMargin: 40;
@@ -207,7 +209,7 @@ Item {
}
}
}
-
+ /*
Rectangle {
id: privateKeysSeparator;
// Size
@@ -344,6 +346,7 @@ Item {
}
}
}
+ */
}
//
diff --git a/interface/resources/qml/hifi/commerce/wallet/Wallet.qml b/interface/resources/qml/hifi/commerce/wallet/Wallet.qml
index f48553a4d0..ffd06cb4a8 100644
--- a/interface/resources/qml/hifi/commerce/wallet/Wallet.qml
+++ b/interface/resources/qml/hifi/commerce/wallet/Wallet.qml
@@ -257,9 +257,9 @@ Rectangle {
Connections {
onSendSignalToWallet: {
if (msg.method === 'walletSecurity_changeSecurityImageCancelled') {
- root.activeView = "walletHome"; // was "security";
+ root.activeView = "security";
} else if (msg.method === 'walletSecurity_changeSecurityImageSuccess') {
- root.activeView = "walletHome"; // was "security";
+ root.activeView = "security";
} else {
sendToScript(msg);
}
@@ -610,7 +610,7 @@ Rectangle {
}
RalewaySemiBold {
- text: "PURCHASES"; // was "SECURITY";
+ text: "SECURITY";
// Text size
size: 16;
// Anchors
@@ -632,11 +632,8 @@ Rectangle {
anchors.fill: parent;
hoverEnabled: enabled;
onClicked: {
- sendToScript({method: 'goToPurchases_fromWalletHome'});
- /* was
root.activeView = "security";
tabButtonsContainer.resetTabButtonColors();
- */
}
onEntered: parent.color = hifi.colors.blueHighlight;
onExited: parent.color = root.activeView === "security" ? hifi.colors.blueAccent : hifi.colors.black;
diff --git a/interface/src/commerce/Ledger.cpp b/interface/src/commerce/Ledger.cpp
index 18d22057fd..67303f2a9b 100644
--- a/interface/src/commerce/Ledger.cpp
+++ b/interface/src/commerce/Ledger.cpp
@@ -31,7 +31,9 @@
QJsonObject Ledger::apiResponse(const QString& label, QNetworkReply* reply) {
QByteArray response = reply->readAll();
QJsonObject data = QJsonDocument::fromJson(response).object();
+#if defined(DEV_BUILD) // Don't expose user's personal data in the wild. But during development this can be handy.
qInfo(commerce) << label << "response" << QJsonDocument(data).toJson(QJsonDocument::Compact);
+#endif
return data;
}
// Non-200 responses are not json:
@@ -69,7 +71,9 @@ void Ledger::send(const QString& endpoint, const QString& success, const QString
auto accountManager = DependencyManager::get();
const QString URL = "/api/v1/commerce/";
JSONCallbackParameters callbackParams(this, success, fail);
+#if defined(DEV_BUILD) // Don't expose user's personal data in the wild. But during development this can be handy.
qCInfo(commerce) << "Sending" << endpoint << QJsonDocument(request).toJson(QJsonDocument::Compact);
+#endif
accountManager->sendRequest(URL + endpoint,
authType,
method,
@@ -130,7 +134,6 @@ bool Ledger::receiveAt(const QString& hfc_key, const QString& signing_key, const
transaction["locker"] = QString::fromUtf8(locker);
QJsonDocument transactionDoc{ transaction };
auto transactionString = transactionDoc.toJson(QJsonDocument::Compact);
- qCDebug(commerce) << "FIXME transactionString" << transactionString;
signedSend("text", transactionString, signing_key, "receive_at", "receiveAtSuccess", "receiveAtFailure");
return true; // Note that there may still be an asynchronous signal of failure that callers might be interested in.
}
@@ -292,7 +295,6 @@ void Ledger::accountSuccess(QNetworkReply* reply) {
// lets set the appropriate stuff in the wallet now
auto wallet = DependencyManager::get();
QByteArray response = reply->readAll();
- qCDebug(commerce) << "FIXME accountSuccess got" << response;
QJsonObject data = QJsonDocument::fromJson(response).object()["data"].toObject();
auto salt = QByteArray::fromBase64(data["salt"].toString().toUtf8());
diff --git a/interface/src/commerce/Wallet.cpp b/interface/src/commerce/Wallet.cpp
index 84e90544ff..5b8417be7c 100644
--- a/interface/src/commerce/Wallet.cpp
+++ b/interface/src/commerce/Wallet.cpp
@@ -201,7 +201,6 @@ bool Wallet::setWallet(const QByteArray& wallet) {
return false;
}
file.close();
- qCDebug(commerce) << "FIXME wrote" << wallet.count() << "to" << keyFilePath();
return true;
}
QByteArray Wallet::getWallet() {
@@ -212,7 +211,6 @@ QByteArray Wallet::getWallet() {
}
QByteArray wallet = file.readAll();
file.close();
- qCDebug(commerce) << "FIXME read" << wallet.count() << "from" << keyFilePath();
return wallet;
}
diff --git a/interface/src/commerce/Wallet.h b/interface/src/commerce/Wallet.h
index 4e7608b096..c096713058 100644
--- a/interface/src/commerce/Wallet.h
+++ b/interface/src/commerce/Wallet.h
@@ -44,10 +44,6 @@ public:
void setCKey(const QByteArray& ckey) { _ckey = ckey; }
QByteArray getCKey() { return _ckey; }
- // FIXME protect more
- bool setWallet(const QByteArray& wallet);
- QByteArray getWallet();
-
bool setPassphrase(const QString& passphrase);
QString* getPassphrase() { return _passphrase; }
bool getPassphraseIsCached() { return !(_passphrase->isEmpty()); }
@@ -77,6 +73,7 @@ private slots:
void handleChallengeOwnershipPacket(QSharedPointer packet, SharedNodePointer sendingNode);
private:
+ friend class Ledger;
QStringList _publicKeys{};
QPixmap* _securityImage { nullptr };
QByteArray _salt;
@@ -91,6 +88,9 @@ private:
bool readSecurityImage(const QString& inputFilePath, unsigned char** outputBufferPtr, int* outputBufferLen);
bool writeBackupInstructions();
+ bool setWallet(const QByteArray& wallet);
+ QByteArray getWallet();
+
void account();
};