idempotency key delivery fix

This commit is contained in:
Stephan D
2026-01-21 16:50:47 +01:00
parent 87f99be01d
commit bd5dfb4f26
11 changed files with 63 additions and 24 deletions

View File

@@ -28,10 +28,11 @@ import 'package:pshared/provider/recipient/pmethods.dart';
import 'package:pshared/provider/resource.dart';
import 'package:pshared/service/payment/quotation.dart';
import 'package:pshared/utils/currency.dart';
import 'package:pshared/utils/exception.dart';
class QuotationProvider extends ChangeNotifier {
Resource<PaymentQuote> _quotation = Resource(data: null, isLoading: false, error: null);
Resource<PaymentQuoteX> _quotation = Resource(data: null, isLoading: false, error: null);
late OrganizationsProvider _organizations;
bool _isLoaded = false;
@@ -162,7 +163,7 @@ class QuotationProvider extends ChangeNotifier {
return recipientName?.isNotEmpty == true ? recipientName : null;
}
void _setResource(Resource<PaymentQuote> quotation) {
void _setResource(Resource<PaymentQuoteX> quotation) {
_quotation = quotation;
notifyListeners();
}
@@ -181,11 +182,7 @@ class QuotationProvider extends ChangeNotifier {
_isLoaded = true;
_setResource(_quotation.copyWith(data: response, isLoading: false, error: null));
} catch (e) {
_setResource(_quotation.copyWith(
data: null,
error: e is Exception ? e : Exception(e.toString()),
isLoading: false,
));
_setResource(_quotation.copyWith(data: null, error: toException(e), isLoading: false));
}
notifyListeners();
return _quotation.data;