move emit signals to wallet interface

This commit is contained in:
Liv Erickson 2018-01-29 16:34:44 -08:00
parent ce8159340b
commit 8b7c989508
3 changed files with 7 additions and 6 deletions

View file

@ -48,6 +48,8 @@ public:
signals:
void walletStatusChanged();
void walletNotSetup();
void ownershipVerificationSuccess(const QUuid& entityID);
void ownershipVerificationFailed(const QUuid& entityID);
private:
uint _walletStatus;

View file

@ -347,7 +347,7 @@ void ContextOverlayInterface::requestOwnershipVerification(const QUuid& entityID
auto ledger = DependencyManager::get<Ledger>();
_challengeOwnershipTimeoutTimer.stop();
emit ledger->updateCertificateStatus(entityProperties.getCertificateID(), (uint)(ledger->CERTIFICATE_STATUS_STATIC_VERIFICATION_FAILED));
emit ownershipVerificationFailed(_lastInspectedEntity);
emit DependencyManager::get<WalletScriptingInterface>()->ownershipVerificationFailed(_lastInspectedEntity);
qCDebug(context_overlay) << "Entity" << _lastInspectedEntity << "failed static certificate verification!";
}
}
@ -404,7 +404,7 @@ void ContextOverlayInterface::startChallengeOwnershipTimer() {
connect(&_challengeOwnershipTimeoutTimer, &QTimer::timeout, this, [=]() {
qCDebug(entities) << "Ownership challenge timed out for" << _lastInspectedEntity;
emit ledger->updateCertificateStatus(entityProperties.getCertificateID(), (uint)(ledger->CERTIFICATE_STATUS_VERIFICATION_TIMEOUT));
emit ownershipVerificationFailed(_lastInspectedEntity);
emit DependencyManager::get<WalletScriptingInterface>()->ownershipVerificationFailed(_lastInspectedEntity);
});
_challengeOwnershipTimeoutTimer.start(5000);
@ -429,9 +429,9 @@ void ContextOverlayInterface::handleChallengeOwnershipReplyPacket(QSharedPointer
if (verificationSuccess) {
emit ledger->updateCertificateStatus(certID, (uint)(ledger->CERTIFICATE_STATUS_VERIFICATION_SUCCESS));
emit ownershipVerificationSuccess(_lastInspectedEntity);
emit DependencyManager::get<WalletScriptingInterface>()->ownershipVerificationSuccess(_lastInspectedEntity);
} else {
emit ledger->updateCertificateStatus(certID, (uint)(ledger->CERTIFICATE_STATUS_OWNER_VERIFICATION_FAILED));
emit ownershipVerificationFailed(_lastInspectedEntity);
emit DependencyManager::get<WalletScriptingInterface>()->ownershipVerificationFailed(_lastInspectedEntity);
}
}

View file

@ -26,6 +26,7 @@
#include "ui/overlays/Overlays.h"
#include "scripting/HMDScriptingInterface.h"
#include "scripting/SelectionScriptingInterface.h"
#include "scripting/WalletScriptingInterface.h"
#include "EntityTree.h"
#include "ContextOverlayLogging.h"
@ -61,8 +62,6 @@ public:
signals:
void contextOverlayClicked(const QUuid& currentEntityWithContextOverlay);
void ownershipVerificationSuccess(const QUuid& entityID);
void ownershipVerificationFailed(const QUuid& entityID);
public slots:
bool createOrDestroyContextOverlay(const EntityItemID& entityItemID, const PointerEvent& event);