Skip to content

Commit

Permalink
hide invalid swaps
Browse files Browse the repository at this point in the history
  • Loading branch information
madMAx43v3r committed Dec 9, 2022
1 parent 672d5aa commit 23899c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,11 @@ std::vector<swap_info_t> Node::get_swaps(const uint32_t& since, const vnx::optio
for(const auto& address : entries) {
const auto info = get_swap_info(address);
if((!token || info.tokens[0] == *token) && (!currency || info.tokens[1] == *currency)) {
result.push_back(info);
if((info.tokens[0] == addr_t() || contract_type_map.count(info.tokens[0]))
&& (info.tokens[1] == addr_t() || contract_type_map.count(info.tokens[1])))
{
result.push_back(info);
}
}
}
return result;
Expand Down

0 comments on commit 23899c4

Please sign in to comment.