feat: integrate enakgame and voucher
Build & Deploy iOS to TestFlight / build-and-deploy (push) Canceled after 0s
Build & Deploy iOS to TestFlight / build-and-deploy (push) Canceled after 0s
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import '../../common/api/interceptors/unauthorized_interceptor.dart';
|
||||
import '../../domain/wallet/wallet.dart';
|
||||
|
||||
/// Hitung mundur bawaan bila server menjawab `429` tanpa header `Retry-After`.
|
||||
@@ -8,7 +9,7 @@ const int kDefaultOtpRetrySeconds = 60;
|
||||
/// Membaca envelope `{ success, data, errors }`. Mengembalikan `null` bila
|
||||
/// sukses, atau [WalletFailure] yang sesuai bila gagal.
|
||||
WalletFailure? parseWalletFailure(Response response) {
|
||||
if (response.statusCode == 401) return const WalletFailure.unauthorized();
|
||||
if (isTokenRejected(response)) return const WalletFailure.unauthorized();
|
||||
|
||||
final body = response.data;
|
||||
if (body is! Map) return _failureFromStatus(response);
|
||||
|
||||
Reference in New Issue
Block a user