mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Remove direct bitcoin calls from qt/splashscreen.cpp
This commit is contained in:
parent
c2f672fb19
commit
5fba3af21e
10 changed files with 139 additions and 29 deletions
32
src/interface/wallet.cpp
Normal file
32
src/interface/wallet.cpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
// Copyright (c) 2018 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <interface/wallet.h>
|
||||
|
||||
#include <interface/handler.h>
|
||||
#include <wallet/wallet.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace interface {
|
||||
namespace {
|
||||
|
||||
class WalletImpl : public Wallet
|
||||
{
|
||||
public:
|
||||
WalletImpl(CWallet& wallet) : m_wallet(wallet) {}
|
||||
|
||||
std::unique_ptr<Handler> handleShowProgress(ShowProgressFn fn) override
|
||||
{
|
||||
return MakeHandler(m_wallet.ShowProgress.connect(fn));
|
||||
}
|
||||
|
||||
CWallet& m_wallet;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
std::unique_ptr<Wallet> MakeWallet(CWallet& wallet) { return MakeUnique<WalletImpl>(wallet); }
|
||||
|
||||
} // namespace interface
|
||||
Loading…
Add table
Add a link
Reference in a new issue