aboutsummaryrefslogtreecommitdiff
path: root/src/interface/wallet.cpp
blob: 01639aa37fd4068267b98be35aea6d4ca593bc89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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