Merge pull request #5211
c9b13fbbtests/trezor: HF9 and HF10 tests (Dusan Klinec)a1fd1d49device/trezor: HF10 support added, wallet::API (Dusan Klinec)d74d26f2crypto: hmac_keccak added (Dusan Klinec)
This commit is contained in:
@@ -109,6 +109,23 @@ bool PendingTransactionImpl::commit(const std::string &filename, bool overwrite)
|
||||
}
|
||||
|
||||
m_wallet.pauseRefresh();
|
||||
|
||||
const bool tx_cold_signed = m_wallet.m_wallet->get_account().get_device().has_tx_cold_sign();
|
||||
if (tx_cold_signed){
|
||||
std::unordered_set<size_t> selected_transfers;
|
||||
for(const tools::wallet2::pending_tx & ptx : m_pending_tx){
|
||||
for(size_t s : ptx.selected_transfers){
|
||||
selected_transfers.insert(s);
|
||||
}
|
||||
}
|
||||
|
||||
m_wallet.m_wallet->cold_tx_aux_import(m_pending_tx, m_tx_device_aux);
|
||||
bool r = m_wallet.m_wallet->import_key_images(m_key_images, 0, selected_transfers);
|
||||
if (!r){
|
||||
throw runtime_error("Cold sign transaction submit failed - key image sync fail");
|
||||
}
|
||||
}
|
||||
|
||||
while (!m_pending_tx.empty()) {
|
||||
auto & ptx = m_pending_tx.back();
|
||||
m_wallet.m_wallet->commit_tx(ptx);
|
||||
|
||||
Reference in New Issue
Block a user