Files
sure/mobile/lib/services/merchants_service.dart
ghost 5372a08788 feat(mobile): add transaction metadata editing (#2131)
* feat(mobile): add transaction metadata editing

* fix(mobile): preserve explicit metadata clears

* fix(mobile): derive persisted tag metadata state

* fix(mobile): avoid logging transaction details

* fix(mobile): harden transaction edit sync

Pass the edited transaction context through provider updates, refresh or fall back after empty update responses, surface field-level API errors, and avoid forced metadata refetches on every edit screen open.

* fix(mobile): keep transaction edit selects ci-compatible

Use the DropdownButtonFormField API supported by the Flutter version pinned in upstream mobile CI.
2026-06-04 23:02:57 +02:00

19 lines
494 B
Dart

import '../models/merchant.dart';
import 'response_list_parser.dart';
class MerchantsService {
Future<Map<String, dynamic>> getMerchants({
required String accessToken,
}) async {
return fetchApiList<Merchant>(
accessToken: accessToken,
path: '/api/v1/merchants',
key: 'merchants',
resultKey: 'merchants',
fromJson: Merchant.fromJson,
isValid: (merchant) => merchant.id.isNotEmpty,
failureMessage: 'Failed to fetch merchants',
);
}
}