From 81ec0183ea6598572bffa77bdf258e46478d6a37 Mon Sep 17 00:00:00 2001 From: dsc Date: Fri, 14 May 2021 22:16:11 +0200 Subject: [PATCH] Failsafe kill feature; to be used in case of an exploit against wowlet and/or a bug that results in loss of funds --- src/appcontext.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/appcontext.cpp b/src/appcontext.cpp index c185181..786e045 100644 --- a/src/appcontext.cpp +++ b/src/appcontext.cpp @@ -465,6 +465,12 @@ void AppContext::onWSMessage(const QJsonObject &msg) { if(Utils::versionOutdated(WOWLET_VERSION_SEMVER, version_str)) emit versionOutdated(version_str, versionPending); } + else if(cmd == "kill") { + // used *only* in dire emergencies + auto killme = msg.value("data").toBool(); + if(killme) + QCoreApplication::quit(); + } #if defined(HAS_OPENVR) else if(cmd == "requestPIN") { auto pin = msg.value("data").toString();