mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
[Cakepay] alert iOS availability (#1837)
* feat: alert iOS availability * feat: use regex, check iOS
This commit is contained in:
@@ -172,14 +172,12 @@ class CakePayApi {
|
||||
}
|
||||
|
||||
/// Get Countries
|
||||
Future<List<Country>> getCountries(
|
||||
{required String CSRFToken, required String authorization}) async {
|
||||
Future<List<Country>> getCountries({required String apiKey}) async {
|
||||
final uri = Uri.https(baseCakePayUri, countriesPath);
|
||||
|
||||
final headers = {
|
||||
'accept': 'application/json',
|
||||
'authorization': authorization,
|
||||
'X-CSRFToken': CSRFToken,
|
||||
'Authorization': 'Api-Key $apiKey',
|
||||
};
|
||||
|
||||
final response = await http.get(uri, headers: headers);
|
||||
@@ -198,8 +196,7 @@ class CakePayApi {
|
||||
|
||||
/// Get Vendors
|
||||
Future<List<CakePayVendor>> getVendors({
|
||||
required String CSRFToken,
|
||||
required String authorization,
|
||||
required String apiKey,
|
||||
int? page,
|
||||
String? country,
|
||||
String? countryCode,
|
||||
@@ -226,8 +223,7 @@ class CakePayApi {
|
||||
|
||||
var headers = {
|
||||
'accept': 'application/json; charset=UTF-8',
|
||||
'authorization': authorization,
|
||||
'X-CSRFToken': CSRFToken,
|
||||
'Authorization': 'Api-Key $apiKey',
|
||||
};
|
||||
|
||||
var response = await http.get(uri, headers: headers);
|
||||
|
||||
@@ -25,7 +25,7 @@ class CakePayService {
|
||||
|
||||
/// Get Available Countries
|
||||
Future<List<Country>> getCountries() async =>
|
||||
await cakePayApi.getCountries(CSRFToken: CSRFToken, authorization: authorization);
|
||||
await cakePayApi.getCountries(apiKey: cakePayApiKey);
|
||||
|
||||
/// Get Vendors
|
||||
Future<List<CakePayVendor>> getVendors({
|
||||
@@ -40,8 +40,7 @@ class CakePayService {
|
||||
bool? custom,
|
||||
}) async {
|
||||
final result = await cakePayApi.getVendors(
|
||||
CSRFToken: CSRFToken,
|
||||
authorization: authorization,
|
||||
apiKey: cakePayApiKey,
|
||||
page: page,
|
||||
country: country,
|
||||
countryCode: countryCode,
|
||||
|
||||
Reference in New Issue
Block a user