Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/wallet.cpp
Show All 14 Lines | |||||
#include <support/allocators/secure.h> | #include <support/allocators/secure.h> | ||||
#include <sync.h> | #include <sync.h> | ||||
#include <ui_interface.h> | #include <ui_interface.h> | ||||
#include <util/check.h> | #include <util/check.h> | ||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <wallet/fees.h> | #include <wallet/fees.h> | ||||
#include <wallet/ismine.h> | #include <wallet/ismine.h> | ||||
#include <wallet/load.h> | #include <wallet/load.h> | ||||
#include <wallet/psbtwallet.h> | |||||
#include <wallet/rpcdump.h> | #include <wallet/rpcdump.h> | ||||
#include <wallet/wallet.h> | #include <wallet/wallet.h> | ||||
namespace interfaces { | namespace interfaces { | ||||
namespace { | namespace { | ||||
//! Construct wallet tx struct. | //! Construct wallet tx struct. | ||||
WalletTx MakeWalletTx(CWallet &wallet, const CWalletTx &wtx) { | WalletTx MakeWalletTx(CWallet &wallet, const CWalletTx &wtx) { | ||||
▲ Show 20 Lines • Show All 276 Lines • ▼ Show 20 Lines | public: | ||||
tx_status = MakeWalletTxStatus(*m_wallet, mi->second); | tx_status = MakeWalletTxStatus(*m_wallet, mi->second); | ||||
return MakeWalletTx(*m_wallet, mi->second); | return MakeWalletTx(*m_wallet, mi->second); | ||||
} | } | ||||
return {}; | return {}; | ||||
} | } | ||||
TransactionError fillPSBT(SigHashType sighash_type, bool sign, | TransactionError fillPSBT(SigHashType sighash_type, bool sign, | ||||
bool bip32derivs, | bool bip32derivs, | ||||
PartiallySignedTransaction &psbtx, | PartiallySignedTransaction &psbtx, | ||||
bool &complete) override { | bool &complete) const override { | ||||
return FillPSBT(m_wallet.get(), psbtx, complete, sighash_type, sign, | return m_wallet->FillPSBT(psbtx, complete, sighash_type, sign, | ||||
bip32derivs); | bip32derivs); | ||||
} | } | ||||
WalletBalances getBalances() override { | WalletBalances getBalances() override { | ||||
const auto bal = m_wallet->GetBalance(); | const auto bal = m_wallet->GetBalance(); | ||||
WalletBalances result; | WalletBalances result; | ||||
result.balance = bal.m_mine_trusted; | result.balance = bal.m_mine_trusted; | ||||
result.unconfirmed_balance = bal.m_mine_untrusted_pending; | result.unconfirmed_balance = bal.m_mine_untrusted_pending; | ||||
result.immature_balance = bal.m_mine_immature; | result.immature_balance = bal.m_mine_immature; | ||||
result.have_watch_only = haveWatchOnly(); | result.have_watch_only = haveWatchOnly(); | ||||
▲ Show 20 Lines • Show All 185 Lines • Show Last 20 Lines |