Showing the changes to interface/src/scripting/WalletScriptingInterface.cpp (1 of 4 files). Show all
Unified · Split
| @@ -16,6 +16,16 @@ CheckoutProxy::CheckoutProxy(QObject* qmlObject, QObject* parent) : QmlWrapper(q · 15 unmodified lines | ||
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | WalletScriptingInterface::WalletScriptingInterface() { |
| 19 | + _contextOverlayInterface = DependencyManager::get<ContextOverlayInterface>(); | |
| 20 | + | |
| 21 | + _entityPropertyFlags += PROP_POSITION; | |
| 22 | + _entityPropertyFlags += PROP_ROTATION; | |
| 23 | + _entityPropertyFlags += PROP_MARKETPLACE_ID; | |
| 24 | + _entityPropertyFlags += PROP_DIMENSIONS; | |
| 25 | + _entityPropertyFlags += PROP_REGISTRATION_POINT; | |
| 26 | + _entityPropertyFlags += PROP_CERTIFICATE_ID; | |
| 27 | + _entityPropertyFlags += PROP_CLIENT_ONLY; | |
| 28 | + _entityPropertyFlags += PROP_OWNING_AVATAR_ID; | |
| 19 | 29 | } |
| 20 | 30 | |
| 21 | 31 | void WalletScriptingInterface::refreshWalletStatus() { |
| @@ -26,4 +36,16 @@ void WalletScriptingInterface::refreshWalletStatus() { · 4 unmodified lines | ||
| 26 | 36 | void WalletScriptingInterface::setWalletStatus(const uint& status) { |
| 27 | 37 | _walletStatus = status; |
| 28 | 38 | emit DependencyManager::get<Wallet>()->walletStatusResult(status); |
| 39 | +} | |
| 40 | + | |
| 41 | +void WalletScriptingInterface::proveAvatarEntityOwnershipVerification(const QUuid& entityID) { | |
| 42 | + EntityItemProperties entityProperties = DependencyManager::get<EntityScriptingInterface>()->getEntityProperties(entityID, _entityPropertyFlags); | |
| 43 | + if (!entityID.isNull() && entityProperties.getMarketplaceID().length() > 0) { | |
| 44 | + if (!entityProperties.getClientOnly()) { | |
| 45 | + qCDebug(entities) << "Failed to prove ownership of:" << entityID << "is not an avatar entity"; | |
| 46 | + emit _contextOverlayInterface->ownershipVerificationFailed(entityID); | |
| 47 | + return; | |
| 48 | + } | |
| 49 | + _contextOverlayInterface->requestOwnershipVerification(entityID); | |
| 50 | + } | |
| 29 | 51 | } |