diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 4691854e..b80d7445 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -4501,9 +4501,9 @@ void wallet2::sweep_below(size_t fake_outs_count, const currency::account_public set_payment_id_to_tx(ftp.attachments, payment_id); // put encrypted payer info into the extra ftp.crypt_address = destination_addr; - currency::tx_payer txp = AUTO_VAL_INIT(txp); - txp.acc_addr = m_account.get_public_address(); - ftp.extra.push_back(txp); + + currency::create_and_add_tx_payer_to_container_from_address(ftp.extra, m_account.get_public_address(), get_top_block_height(), m_core_runtime_config); + ftp.flags = 0; // ftp.multisig_id -- not required // ftp.prepared_destinations -- will be filled by prepare_tx_destinations diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp index 040ef071..a90ae5a7 100644 --- a/src/wallet/wallet_rpc_server.cpp +++ b/src/wallet/wallet_rpc_server.cpp @@ -292,9 +292,7 @@ namespace tools if (req.push_payer) { - currency::tx_payer txp = AUTO_VAL_INIT(txp); - txp.acc_addr = m_wallet.get_account().get_keys().account_address; - extra.push_back(txp); + currency::create_and_add_tx_payer_to_container_from_address(extra, m_wallet.get_account().get_keys().account_address, m_wallet.get_top_block_height(), m_wallet.get_core_runtime_config()); } if (!req.hide_receiver) {