mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Pad change keys for wallet interface pending txs
This commit is contained in:
parent
466b3d03f5
commit
70458f6f9d
1 changed files with 5 additions and 0 deletions
|
|
@ -235,6 +235,11 @@ public:
|
|||
{
|
||||
LOCK2(cs_main, m_wallet.cs_wallet);
|
||||
auto pending = MakeUnique<PendingWalletTxImpl>(m_wallet);
|
||||
// Pad change keys to cover total possible number of assets
|
||||
// One already exists(for policyAsset), so one for each destination
|
||||
for (size_t i = 0; i < recipients.size(); ++i) {
|
||||
pending->m_keys.emplace_back(new CReserveKey(&m_wallet));
|
||||
}
|
||||
if (!m_wallet.CreateTransaction(recipients, pending->m_tx, pending->m_keys, fee, change_pos,
|
||||
fail_reason, coin_control, sign)) {
|
||||
return {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue