Skip to content

Commit

Permalink
removing smart retry package
Browse files Browse the repository at this point in the history
doesn't really seem to work very well - also too unpredictable
  • Loading branch information
n13 committed Nov 11, 2024
1 parent 9e5ec10 commit c4d6d6e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
15 changes: 0 additions & 15 deletions lib/core/network/networking_manager.dart
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
import 'package:dio/dio.dart';
import 'package:dio/io.dart';
import 'package:dio_smart_retry/dio_smart_retry.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:hypha_wallet/core/logging/log_helper.dart';
import 'package:hypha_wallet/core/network/api/endpoints.dart';
import 'package:pretty_dio_logger/pretty_dio_logger.dart';

class NetworkingManager extends DioForNative {
NetworkingManager(String baseUrl) : super() {
final retryInterceptor = RetryInterceptor(
dio: this,
logPrint: (message) {
FirebaseCrashlytics.instance.log('Retry call: $message');
LogHelper.e('Retry call: $message');
},
retries: 1, // retry count
retryDelays: const [
Duration(seconds: 1), // wait 1 sec before first retry
],
);

final loggerInterceptor = PrettyDioLogger(
requestHeader: false,
requestBody: true,
Expand All @@ -29,7 +15,6 @@ class NetworkingManager extends DioForNative {
compact: true,
);

interceptors.add(retryInterceptor);
if (kIsDebugNetworking) {
interceptors.add(loggerInterceptor);
}
Expand Down
8 changes: 0 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.7.0"
dio_smart_retry:
dependency: "direct main"
description:
name: dio_smart_retry
sha256: "1a2d0cf73ab56bf5998b375cda2d51f45c77268e712e4073f232cdc7753a94b2"
url: "https://pub.dev"
source: hosted
version: "5.0.0"
dio_web_adapter:
dependency: transitive
description:
Expand Down
2 changes: 0 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ dependencies:

# Network
dio: ^5.3.0
# Retry failed calls
dio_smart_retry: ^5.0.0
# API Logs in Terminal
pretty_dio_logger: ^1.3.1

Expand Down

0 comments on commit c4d6d6e

Please sign in to comment.