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

Method open

src/qt/walletcontroller.cpp:334–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332}
333
334void OpenWalletActivity::open(const std::string& path)
335{
336 QString name = path.empty() ? QString("["+tr("default wallet")+"]") : QString::fromStdString(path);
337
338 showProgressDialog(
339 //: Title of window indicating the progress of opening of a wallet.
340 tr("Open Wallet"),
341 /*: Descriptive text of the open wallet progress window which indicates
342 to the user which wallet is currently being opened. */
343 tr("Opening Wallet <b>%1</b>…").arg(name.toHtmlEscaped()));
344
345 QTimer::singleShot(0, worker(), [this, path] {
346 std::unique_ptr<interfaces::Wallet> wallet = node().walletLoader().loadWallet(path, m_error_message, m_warning_message);
347
348 if (wallet) m_wallet_model = m_wallet_controller->getOrCreateWallet(std::move(wallet));
349
350 QTimer::singleShot(0, this, &OpenWalletActivity::finish);
351 });
352}
353
354LoadWalletsActivity::LoadWalletsActivity(WalletController* wallet_controller, QWidget* parent_widget)
355 : WalletControllerActivity(wallet_controller, parent_widget)

Callers 2

createActionsMethod · 0.45
writeMethod · 0.45

Calls 3

loadWalletMethod · 0.80
getOrCreateWalletMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected