Separated request idempotency from intent identity

This commit is contained in:
Arseni
2026-01-26 15:49:20 +03:00
parent 7391a67f82
commit d0ba9d6166
2 changed files with 4 additions and 0 deletions

View File

@@ -91,12 +91,14 @@ class QuotationProvider extends ChangeNotifier {
if (!_organizations.isOrganizationSet) throw StateError('Organization is not set');
_lastIntent = intent;
try {
final intentKey = _buildIntentKey(intent);
_setResource(_quotation.copyWith(isLoading: true, error: null));
final response = await QuotationService.getQuotation(
_organizations.current.id,
QuotePaymentRequest(
idempotencyKey: Uuid().v4(),
intent: intent.toDTO(),
intentKey: intentKey,
),
);
_isLoaded = true;