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
1616 Q_ASSERT(QThread::currentThread() == qApp->thread());
1717 }
1818
19+WalletScriptingInterface::WalletScriptingInterface() {
20+ connect(DependencyManager::get<AccountManager>().data(),
21+ &AccountManager::limitedCommerceChanged, this, &WalletScriptingInterface::limitedCommerceChanged);
22+}
23+
1924 void WalletScriptingInterface::refreshWalletStatus() {
2025 auto wallet = DependencyManager::get<Wallet>();
2126 wallet->getWalletStatus();
@@ -40,9 +45,3 @@ void WalletScriptingInterface::proveAvatarEntityOwnershipVerification(const QUui · 18 unmodified lines
4045 qCDebug(entities) << "Failed to prove ownership of:" << entityID << "is not an avatar entity";
4146 }
4247 }
43−
44−void WalletScriptingInterface::setLimitedCommerce(bool isLimited) {
45− _limitedCommerce = isLimited;
46− Setting::Handle<bool> limitedCommerceSetting{ "limitedCommerce", false };
47− limitedCommerceSetting.set(_limitedCommerce);
48−}