mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
QT: Always return blinded address
This commit is contained in:
parent
dbac2afd0f
commit
ab21387c8b
3 changed files with 9 additions and 1 deletions
|
|
@ -192,6 +192,10 @@ public:
|
|||
return result;
|
||||
}
|
||||
void learnRelatedScripts(const CPubKey& key, OutputType type) override { m_wallet.LearnRelatedScripts(key, type); }
|
||||
CPubKey getBlindingPubKey(const CScript& script) override
|
||||
{
|
||||
return m_wallet.GetBlindingPubKey(script);
|
||||
}
|
||||
bool addDestData(const CTxDestination& dest, const std::string& key, const std::string& value) override
|
||||
{
|
||||
LOCK(m_wallet.cs_wallet);
|
||||
|
|
|
|||
|
|
@ -111,6 +111,9 @@ public:
|
|||
//! database can detect payments to newer address types.
|
||||
virtual void learnRelatedScripts(const CPubKey& key, OutputType type) = 0;
|
||||
|
||||
//! Get blinding pubkey for script
|
||||
virtual CPubKey getBlindingPubKey(const CScript& script) = 0;
|
||||
|
||||
//! Add dest data.
|
||||
virtual bool addDestData(const CTxDestination& dest, const std::string& key, const std::string& value) = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -380,7 +380,8 @@ QString AddressTableModel::addRow(const QString &type, const QString &label, con
|
|||
}
|
||||
}
|
||||
walletModel->wallet().learnRelatedScripts(newKey, address_type);
|
||||
strAddress = EncodeDestination(GetDestinationForKey(newKey, address_type));
|
||||
CPubKey blinding_pubkey = walletModel->wallet().getBlindingPubKey(GetScriptForDestination(GetDestinationForKey(newKey, address_type)));
|
||||
strAddress = EncodeDestination(GetDestinationForKey(newKey, address_type, blinding_pubkey));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue