From d0e32911ad3dfd61fb746895f78f3fe013f5e89e Mon Sep 17 00:00:00 2001 From: Pedro Pinto Date: Thu, 10 Jan 2019 11:23:20 -0500 Subject: [PATCH] Made recovery of lost order use case insensitive op id and account. Turns out CME upper cases operator id and clearing account when it sends them back. --- src/lib/api/service_helpers/AdminServiceUtils.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/api/service_helpers/AdminServiceUtils.cpp b/src/lib/api/service_helpers/AdminServiceUtils.cpp index ca30f9f61..0c86f2a7f 100644 --- a/src/lib/api/service_helpers/AdminServiceUtils.cpp +++ b/src/lib/api/service_helpers/AdminServiceUtils.cpp @@ -8,6 +8,7 @@ #include #include +#include namespace bts{ namespace admin{ @@ -814,9 +815,13 @@ AdminServiceUtils::find_user_account_matches (const bts::api::admin::AdminData& auto user_ptrs = users(admin_data, false); for(const bts::api::admin::BTSAccount* account_ptr : account_ptrs){ if (account_has_connection(*account_ptr, connection)){ - if (exchange_account == find_account_exchange_account(admin_data,*account_ptr,exchange,find_account_result) && find_account_result.is_success()){ + if (boost::algorithm::iequals(exchange_account, + find_account_exchange_account(admin_data,*account_ptr,exchange,find_account_result)) && + find_account_result.is_success()){ for(const bts::api::admin::BTSUser* user_ptr : user_ptrs){ - if (exchange_user == find_user_exchange_id(admin_data,*user_ptr,exchange,find_user_result) && find_user_result.is_success()) + if (boost::algorithm::iequals(exchange_user, + find_user_exchange_id(admin_data,*user_ptr,exchange,find_user_result)) && + find_user_result.is_success()) return std::pair(account_ptr,user_ptr); } }