simplify: dedupe boilerplate and remove dead code across all layers
This commit is contained in:
@@ -6,8 +6,6 @@ import 'get_ticker_response.dart';
|
||||
class GetTicker extends MarianumConnectQuery {
|
||||
GetTicker({super.dio});
|
||||
|
||||
Future<TickerResponse> run() => guard(() async {
|
||||
final response = await dio.get<Map<String, dynamic>>(endpoint('ticker'));
|
||||
return TickerResponse.fromJson(response.data!);
|
||||
});
|
||||
Future<TickerResponse> run() =>
|
||||
getObject('ticker', TickerResponse.fromJson);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user