aboutsummaryrefslogtreecommitdiff
path: root/src/device_trezor
diff options
context:
space:
mode:
authorDusan Klinec <dusan.klinec@gmail.com>2021-03-03 14:51:04 +0100
committerDusan Klinec <dusan.klinec@gmail.com>2021-03-03 15:39:12 +0100
commit25588de40c0cf1c14964c89cff18d002c60ffe5c (patch)
treef2aaadc186738cd2f2eaf1d708711e0a839d87ff /src/device_trezor
parentMerge pull request #7362 (diff)
downloadmonero-25588de40c0cf1c14964c89cff18d002c60ffe5c.tar.xz
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
Diffstat (limited to 'src/device_trezor')
-rw-r--r--src/device_trezor/trezor/protocol.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/device_trezor/trezor/protocol.cpp b/src/device_trezor/trezor/protocol.cpp
index 288f3ddca..92150b579 100644
--- a/src/device_trezor/trezor/protocol.cpp
+++ b/src/device_trezor/trezor/protocol.cpp
@@ -502,21 +502,9 @@ namespace tx {
}
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();
std::string change_hash = hash_addr(&chg.addr(), chg.amount(), chg.is_subaddress());
-
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;
for (auto & cur : tsx_data->outputs()){
@@ -527,8 +515,7 @@ namespace tx {
continue;
}
- c_hash = hash_addr(&cur.addr());
- if (integrated_hashes.find(c_hash) != integrated_hashes.end()){
+ if (cur.is_integrated()){
integrated_indices.push_back((uint32_t)idx);
}
}