File tree 2 files changed +17
-0
lines changed
lib/services/connection/api_manager
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import 'package:flutter_deriv_api/api/manually/tick.dart';
12
12
import 'package:flutter_deriv_api/api/models/base_exception_model.dart' ;
13
13
import 'package:flutter_deriv_api/api/response/active_symbols_response_result.dart' ;
14
14
import 'package:flutter_deriv_api/api/response/authorize_response_result.dart' ;
15
+ import 'package:flutter_deriv_api/api/response/landing_company_response_result.dart' ;
15
16
import 'package:flutter_deriv_api/api/response/ticks_response_result.dart' ;
16
17
import 'package:flutter_deriv_api/basic_api/generated/active_symbols_receive.dart' ;
17
18
import 'package:flutter_deriv_api/basic_api/generated/active_symbols_send.dart' ;
Original file line number Diff line number Diff line change @@ -157,11 +157,27 @@ void _handleCustomEvent(
157
157
158
158
sendPort.send (message.copyWith (data: response));
159
159
case CustomEvent .landingCompany:
160
+ await _fetchLandingCompnay (api, message, sendPort);
160
161
case CustomEvent .statesList:
161
162
case CustomEvent .residenceList:
162
163
}
163
164
}
164
165
166
+ Future <void > _fetchLandingCompnay (BinaryAPI api,
167
+ CustomIsolateEvent <dynamic > message, SendPort sendPort) async {
168
+ final LandingCompanyReceive response =
169
+ await api.call (request: message.request);
170
+
171
+ checkException (
172
+ response: response,
173
+ exceptionCreator: ({BaseExceptionModel ? baseExceptionModel}) =>
174
+ BaseAPIException (baseExceptionModel: baseExceptionModel),
175
+ );
176
+
177
+ sendPort.send (message.copyWith (
178
+ data: LandingCompanyResponse .fromJson (response.landingCompany)));
179
+ }
180
+
165
181
Future <void > _fetchActiveSymbols (
166
182
BinaryAPI api,
167
183
CustomIsolateEvent <dynamic > message,
You can’t perform that action at this time.
0 commit comments