History

Use AccountManager instead of settings

Zach Fox committed 8 years ago

Commit d0854ca1 parent 402c23e5 files · +22 −12Browse files

Showing the changes to interface/src/scripting/WalletScriptingInterface.cpp (1 of 5 files). Show all

Unified · Split

interface/src/scripting/WalletScriptingInterface.cpp+5−6
@@ -16,6 +16,11 @@ CheckoutProxy::CheckoutProxy(QObject* qmlObject, QObject* parent) : QmlWrapper(q · 15 unmodified lines
16 Q_ASSERT(QThread::currentThread() == qApp->thread());16 Q_ASSERT(QThread::currentThread() == qApp->thread());
17}17}
18 18
19WalletScriptingInterface::WalletScriptingInterface() {
20 connect(DependencyManager::get<AccountManager>().data(),
21 &AccountManager::limitedCommerceChanged, this, &WalletScriptingInterface::limitedCommerceChanged);
22}
23
19void WalletScriptingInterface::refreshWalletStatus() {24void WalletScriptingInterface::refreshWalletStatus() {
20 auto wallet = DependencyManager::get<Wallet>();25 auto wallet = DependencyManager::get<Wallet>();
21 wallet->getWalletStatus();26 wallet->getWalletStatus();
@@ -40,9 +45,3 @@ void WalletScriptingInterface::proveAvatarEntityOwnershipVerification(const QUui · 18 unmodified lines
40 qCDebug(entities) << "Failed to prove ownership of:" << entityID << "is not an avatar entity";45 qCDebug(entities) << "Failed to prove ownership of:" << entityID << "is not an avatar entity";
41 }46 }
42}47}
43
44void WalletScriptingInterface::setLimitedCommerce(bool isLimited) {
45 _limitedCommerce = isLimited;
46 Setting::Handle<bool> limitedCommerceSetting{ "limitedCommerce", false };
47 limitedCommerceSetting.set(_limitedCommerce);
48}