mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 20:19:34 +00:00
trezor: simplify recognition of integrated addresses
now it is possible to simplify integrated addresses recognition using transaction destination info directly fixes https://github.com/monero-project/monero-gui/issues/3346
This commit is contained in:
parent
b8f3e44a3f
commit
68f1ca65e6
1 changed files with 1 additions and 14 deletions
|
@ -502,21 +502,9 @@ namespace tx {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Signer::compute_integrated_indices(TsxData * tsx_data){
|
void Signer::compute_integrated_indices(TsxData * tsx_data){
|
||||||
if (m_aux_data == nullptr || m_aux_data->tx_recipients.empty()){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto & chg = tsx_data->change_dts();
|
auto & chg = tsx_data->change_dts();
|
||||||
std::string change_hash = hash_addr(&chg.addr(), chg.amount(), chg.is_subaddress());
|
std::string change_hash = hash_addr(&chg.addr(), chg.amount(), chg.is_subaddress());
|
||||||
|
|
||||||
std::vector<uint32_t> integrated_indices;
|
std::vector<uint32_t> integrated_indices;
|
||||||
std::set<std::string> integrated_hashes;
|
|
||||||
for (auto & cur : m_aux_data->tx_recipients){
|
|
||||||
if (!cur.has_payment_id){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
integrated_hashes.emplace(hash_addr(&cur.address.m_spend_public_key, &cur.address.m_view_public_key));
|
|
||||||
}
|
|
||||||
|
|
||||||
ssize_t idx = -1;
|
ssize_t idx = -1;
|
||||||
for (auto & cur : tsx_data->outputs()){
|
for (auto & cur : tsx_data->outputs()){
|
||||||
|
@ -527,8 +515,7 @@ namespace tx {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
c_hash = hash_addr(&cur.addr());
|
if (cur.is_integrated()){
|
||||||
if (integrated_hashes.find(c_hash) != integrated_hashes.end()){
|
|
||||||
integrated_indices.push_back((uint32_t)idx);
|
integrated_indices.push_back((uint32_t)idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue