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

Method addWallet

src/qt/rpcconsole.cpp:789–801  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

787
788#ifdef ENABLE_WALLET
789void RPCConsole::addWallet(WalletModel * const walletModel)
790{
791 // use name for text and wallet model for internal data object (to allow to move to a wallet id later)
792 ui->WalletSelector->addItem(walletModel->getDisplayName(), QVariant::fromValue(walletModel));
793 if (ui->WalletSelector->count() == 2 && !isVisible()) {
794 // First wallet added, set to default so long as the window isn't presently visible (and potentially in use)
795 ui->WalletSelector->setCurrentIndex(1);
796 }
797 if (ui->WalletSelector->count() > 2) {
798 ui->WalletSelector->setVisible(true);
799 ui->WalletSelectorLabel->setVisible(true);
800 }
801}
802
803void RPCConsole::removeWallet(WalletModel * const walletModel)
804{

Callers

nothing calls this directly

Calls 2

getDisplayNameMethod · 0.80
countMethod · 0.80

Tested by

no test coverage detected