pull/816/head
David Burkett 3 years ago committed by Loshan T
parent 149b4e5da5
commit 6b88691d7c

@ -49,8 +49,12 @@ WalletTxOut MakeWalletTxOut(CWallet& wallet,
if (output.IsMWEB()) {
mw::Coin coin;
if (wallet.GetCoin(output.ToMWEB(), coin)) {
result.address = wallet.GetMWWallet()->GetStealthAddress(coin.address_index);
if (wallet.GetCoin(output.ToMWEB(), coin) && coin.IsMine()) {
StealthAddress addr;
if (wallet.GetMWWallet()->GetStealthAddress(coin, addr)) {
result.address = addr;
}
result.nValue = coin.amount;
}
} else {
@ -538,9 +542,9 @@ public:
RemoveWallet(m_wallet, false /* load_on_start */);
}
bool isLegacy() override { return m_wallet->IsLegacy(); }
StealthAddress getPeginAddress() override
bool getPeginAddress(StealthAddress& pegin_address) override
{
return m_wallet->GetMWWallet()->GetStealthAddress(mw::PEGIN_INDEX);
return m_wallet->GetMWWallet()->GetStealthAddress(mw::PEGIN_INDEX, pegin_address);
}
std::unique_ptr<Handler> handleUnload(UnloadFn fn) override
{

@ -283,8 +283,8 @@ public:
//! Return whether is a legacy wallet
virtual bool isLegacy() = 0;
// Get MWEB wallet.
virtual StealthAddress getPeginAddress() = 0;
// Get pegin address from MWEB wallet.
virtual bool getPeginAddress(StealthAddress& pegin_address) = 0;
//! Register handler for unload message.
using UnloadFn = std::function<void()>;

Loading…
Cancel
Save