From 79de0dd4d888cd2c6c7bdbc8b14b7a40a60f0c9a Mon Sep 17 00:00:00 2001 From: taha afzal Date: Mon, 11 Jul 2022 21:13:05 -0400 Subject: [PATCH] Removed exchange from sub acocunt config --- src/lib/api/service_helpers/AdminServiceUtils.h | 4 ++-- src/lib/config/defaults/toggles.conf | 2 -- src/lib/config/protos/toggles.proto | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lib/api/service_helpers/AdminServiceUtils.h b/src/lib/api/service_helpers/AdminServiceUtils.h index 551165bd7..1e3dac528 100644 --- a/src/lib/api/service_helpers/AdminServiceUtils.h +++ b/src/lib/api/service_helpers/AdminServiceUtils.h @@ -33,10 +33,10 @@ class AdminServiceUtils { return is_int_account ? entry.bts_account_name() : entry.exchange_subaccount(); }; - if (sec == nullptr) + if(sec == nullptr) return nullptr; for (const auto &u : exch_sub_accounts.accounts()) { - if (u.exchange() == sec->exchange() && get_account(u) == account) + if (get_account(u) == account) return &u; } return nullptr; diff --git a/src/lib/config/defaults/toggles.conf b/src/lib/config/defaults/toggles.conf index 79d8973b2..35eb39bd5 100644 --- a/src/lib/config/defaults/toggles.conf +++ b/src/lib/config/defaults/toggles.conf @@ -87,12 +87,10 @@ value{ ExchangeSubAccounts { value{ accounts{ - exchange: VENUE_DERIBIT exchange_subaccount: "ZmIKL6fb" bts_account_name: "MAIN" } accounts{ - exchange: VENUE_DERIBIT exchange_subaccount: "v1iSzZrY" bts_account_name: "SMALL" } diff --git a/src/lib/config/protos/toggles.proto b/src/lib/config/protos/toggles.proto index 31595b8f4..f5ac2ca28 100644 --- a/src/lib/config/protos/toggles.proto +++ b/src/lib/config/protos/toggles.proto @@ -101,7 +101,6 @@ message DefaultAccount{ // this ultimately needs to go to risk admin: sub_account -> account message ExchangeSubAccountUnit{ - optional bts.api.Venue exchange = 1; optional string exchange_subaccount = 10; optional string bts_account_name = 20; }