Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/atomic.dex.qt.orders.model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ namespace atomic_dex
data.order_error_state = error.first;
data.order_error_message = error.second;
}
this->m_swaps_id_registry.emplace(contents.uuid);
if (this->m_swaps_id_registry.find(contents.uuid) == m_swaps_id_registry.end()) {
this->m_swaps_id_registry.emplace(contents.uuid);
}
this->m_model_data.push_back(std::move(data));
endInsertRows();
emit lengthChanged();
Expand All @@ -333,6 +335,10 @@ namespace atomic_dex
update_value(OrdersRoles::OrderErrorStateRole, state, idx, *this);
update_value(OrdersRoles::OrderErrorMessageRole, msg, idx, *this);
emit lengthChanged();
} else {
bool is_maker = boost::algorithm::to_lower_copy(contents.type) == "maker";
spdlog::error("swap with id {} and ticker: {}, not found in the model, cannot update, forcing an initialization instead", contents.uuid, is_maker ? contents.maker_coin : contents.taker_coin);
initialize_swap(contents);
}
}

Expand Down