MCPcopy Create free account
hub / github.com/ElementsProject/elements / WalletController

Method WalletController

src/qt/walletcontroller.cpp:37–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35using wallet::WALLET_FLAG_EXTERNAL_SIGNER;
36
37WalletController::WalletController(ClientModel& client_model, const PlatformStyle* platform_style, QObject* parent)
38 : QObject(parent)
39 , m_activity_thread(new QThread(this))
40 , m_activity_worker(new QObject)
41 , m_client_model(client_model)
42 , m_node(client_model.node())
43 , m_platform_style(platform_style)
44 , m_options_model(client_model.getOptionsModel())
45{
46 m_handler_load_wallet = m_node.walletLoader().handleLoadWallet([this](std::unique_ptr<interfaces::Wallet> wallet) {
47 getOrCreateWallet(std::move(wallet));
48 });
49
50 m_activity_worker->moveToThread(m_activity_thread);
51 m_activity_thread->start();
52 QTimer::singleShot(0, m_activity_worker, []() {
53 util::ThreadRename("qt-walletctrl");
54 });
55}
56
57// Not using the default destructor because not all member types definitions are
58// available in the header, just forward declared.

Callers

nothing calls this directly

Calls 3

getOptionsModelMethod · 0.45
handleLoadWalletMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected