cake pay country picker (#1779)
* cake pay country picker * UI changes * hide picker after the country is set * Revert "hide picker after the country is set" This reverts commit cce358b94f55c22e0807b4d3641a13ebd299106c. * show country picker initially * flags * minor ui fixes * Update lib/view_model/cake_pay/cake_pay_cards_list_view_model.dart --------- Co-authored-by: tuxpizza <tuxsudo@tux.pizza> Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
Serhii committed
Nov 7, 2024 at 07:50 UTC
48457fdd6d3b15beacdbe170117dcbc2cbce25dc
132 files changed
+601
-78
assets/images/flags/abw.png
Binary files /dev/null and b/assets/images/flags/abw.png differ
assets/images/flags/afg.png
Binary files /dev/null and b/assets/images/flags/afg.png differ
assets/images/flags/ago.png
Binary files /dev/null and b/assets/images/flags/ago.png differ
assets/images/flags/aia.png
Binary files /dev/null and b/assets/images/flags/aia.png differ
assets/images/flags/and.png
Binary files /dev/null and b/assets/images/flags/and.png differ
assets/images/flags/asm.png
Binary files /dev/null and b/assets/images/flags/asm.png differ
assets/images/flags/atf.png
Binary files /dev/null and b/assets/images/flags/atf.png differ
assets/images/flags/atg.png
Binary files /dev/null and b/assets/images/flags/atg.png differ
assets/images/flags/aut.png
Binary files /dev/null and b/assets/images/flags/aut.png differ
assets/images/flags/aze.png
Binary files /dev/null and b/assets/images/flags/aze.png differ
assets/images/flags/bel.png
Binary files /dev/null and b/assets/images/flags/bel.png differ
assets/images/flags/bes.png
Binary files /dev/null and b/assets/images/flags/bes.png differ
assets/images/flags/bhr.png
Binary files /dev/null and b/assets/images/flags/bhr.png differ
assets/images/flags/blz.png
Binary files /dev/null and b/assets/images/flags/blz.png differ
assets/images/flags/bmu.png
Binary files /dev/null and b/assets/images/flags/bmu.png differ
assets/images/flags/bol.png
Binary files /dev/null and b/assets/images/flags/bol.png differ
assets/images/flags/brn.png
Binary files /dev/null and b/assets/images/flags/brn.png differ
assets/images/flags/btn.png
Binary files /dev/null and b/assets/images/flags/btn.png differ
assets/images/flags/bvt.png
Binary files /dev/null and b/assets/images/flags/bvt.png differ
assets/images/flags/bwa.png
Binary files /dev/null and b/assets/images/flags/bwa.png differ
assets/images/flags/cck.png
Binary files /dev/null and b/assets/images/flags/cck.png differ
assets/images/flags/cmr.png
Binary files /dev/null and b/assets/images/flags/cmr.png differ
assets/images/flags/cok.png
Binary files /dev/null and b/assets/images/flags/cok.png differ
assets/images/flags/cpv.png
Binary files /dev/null and b/assets/images/flags/cpv.png differ
assets/images/flags/cri.png
Binary files /dev/null and b/assets/images/flags/cri.png differ
assets/images/flags/cuw.png
Binary files /dev/null and b/assets/images/flags/cuw.png differ
assets/images/flags/cxr.png
Binary files /dev/null and b/assets/images/flags/cxr.png differ
assets/images/flags/cyp.png
Binary files /dev/null and b/assets/images/flags/cyp.png differ
assets/images/flags/dji.png
Binary files /dev/null and b/assets/images/flags/dji.png differ
assets/images/flags/dma.png
Binary files /dev/null and b/assets/images/flags/dma.png differ
assets/images/flags/dza.png
Binary files /dev/null and b/assets/images/flags/dza.png differ
assets/images/flags/ecu.png
Binary files /dev/null and b/assets/images/flags/ecu.png differ
assets/images/flags/est.png
Binary files /dev/null and b/assets/images/flags/est.png differ
assets/images/flags/eth.png
Binary files /dev/null and b/assets/images/flags/eth.png differ
assets/images/flags/fin.png
Binary files /dev/null and b/assets/images/flags/fin.png differ
assets/images/flags/fji.png
Binary files /dev/null and b/assets/images/flags/fji.png differ
assets/images/flags/flk.png
Binary files /dev/null and b/assets/images/flags/flk.png differ
assets/images/flags/fro.png
Binary files /dev/null and b/assets/images/flags/fro.png differ
assets/images/flags/fsm.png
Binary files /dev/null and b/assets/images/flags/fsm.png differ
assets/images/flags/gab.png
Binary files /dev/null and b/assets/images/flags/gab.png differ
assets/images/flags/geo.png
Binary files /dev/null and b/assets/images/flags/geo.png differ
assets/images/flags/ggi.png
Binary files /dev/null and b/assets/images/flags/ggi.png differ
assets/images/flags/ggy.png
Binary files /dev/null and b/assets/images/flags/ggy.png differ
assets/images/flags/glp.png
Binary files /dev/null and b/assets/images/flags/glp.png differ
assets/images/flags/gmb.png
Binary files /dev/null and b/assets/images/flags/gmb.png differ
assets/images/flags/grc.png
Binary files /dev/null and b/assets/images/flags/grc.png differ
assets/images/flags/grd.png
Binary files /dev/null and b/assets/images/flags/grd.png differ
assets/images/flags/grl.png
Binary files /dev/null and b/assets/images/flags/grl.png differ
assets/images/flags/guf.png
Binary files /dev/null and b/assets/images/flags/guf.png differ
assets/images/flags/gum.png
Binary files /dev/null and b/assets/images/flags/gum.png differ
assets/images/flags/guy.png
Binary files /dev/null and b/assets/images/flags/guy.png differ
assets/images/flags/hmd.png
Binary files /dev/null and b/assets/images/flags/hmd.png differ
assets/images/flags/iot.png
Binary files /dev/null and b/assets/images/flags/iot.png differ
assets/images/flags/irl.png
Binary files /dev/null and b/assets/images/flags/irl.png differ
assets/images/flags/jam.png
Binary files /dev/null and b/assets/images/flags/jam.png differ
assets/images/flags/jey.png
Binary files /dev/null and b/assets/images/flags/jey.png differ
assets/images/flags/jor.png
Binary files /dev/null and b/assets/images/flags/jor.png differ
assets/images/flags/kaz.png
Binary files /dev/null and b/assets/images/flags/kaz.png differ
assets/images/flags/ken.png
Binary files /dev/null and b/assets/images/flags/ken.png differ
assets/images/flags/kir.png
Binary files /dev/null and b/assets/images/flags/kir.png differ
assets/images/flags/kwt.png
Binary files /dev/null and b/assets/images/flags/kwt.png differ
assets/images/flags/lbn.png
Binary files /dev/null and b/assets/images/flags/lbn.png differ
assets/images/flags/lie.png
Binary files /dev/null and b/assets/images/flags/lie.png differ
assets/images/flags/lka.png
Binary files /dev/null and b/assets/images/flags/lka.png differ
assets/images/flags/ltu.png
Binary files /dev/null and b/assets/images/flags/ltu.png differ
assets/images/flags/lux.png
Binary files /dev/null and b/assets/images/flags/lux.png differ
assets/images/flags/lva.png
Binary files /dev/null and b/assets/images/flags/lva.png differ
assets/images/flags/mco.png
Binary files /dev/null and b/assets/images/flags/mco.png differ
assets/images/flags/mlt.png
Binary files /dev/null and b/assets/images/flags/mlt.png differ
assets/images/flags/mnp.png
Binary files /dev/null and b/assets/images/flags/mnp.png differ
assets/images/flags/mrt.png
Binary files /dev/null and b/assets/images/flags/mrt.png differ
assets/images/flags/msr.png
Binary files /dev/null and b/assets/images/flags/msr.png differ
assets/images/flags/mtq.png
Binary files /dev/null and b/assets/images/flags/mtq.png differ
assets/images/flags/mwi.png
Binary files /dev/null and b/assets/images/flags/mwi.png differ
assets/images/flags/myt.png
Binary files /dev/null and b/assets/images/flags/myt.png differ
assets/images/flags/ner.png
Binary files /dev/null and b/assets/images/flags/ner.png differ
assets/images/flags/nfk.png
Binary files /dev/null and b/assets/images/flags/nfk.png differ
assets/images/flags/niu.png
Binary files /dev/null and b/assets/images/flags/niu.png differ
assets/images/flags/omn.png
Binary files /dev/null and b/assets/images/flags/omn.png differ
assets/images/flags/per.png
Binary files /dev/null and b/assets/images/flags/per.png differ
assets/images/flags/plw.png
Binary files /dev/null and b/assets/images/flags/plw.png differ
assets/images/flags/pri.png
Binary files /dev/null and b/assets/images/flags/pri.png differ
assets/images/flags/pyf.png
Binary files /dev/null and b/assets/images/flags/pyf.png differ
assets/images/flags/qat.png
Binary files /dev/null and b/assets/images/flags/qat.png differ
assets/images/flags/slb.png
Binary files /dev/null and b/assets/images/flags/slb.png differ
assets/images/flags/slv.png
Binary files /dev/null and b/assets/images/flags/slv.png differ
assets/images/flags/svk.png
Binary files /dev/null and b/assets/images/flags/svk.png differ
assets/images/flags/svn.png
Binary files /dev/null and b/assets/images/flags/svn.png differ
assets/images/flags/tkm.png
Binary files /dev/null and b/assets/images/flags/tkm.png differ
assets/images/flags/ton.png
Binary files /dev/null and b/assets/images/flags/ton.png differ
assets/images/flags/tuv.png
Binary files /dev/null and b/assets/images/flags/tuv.png differ
assets/images/flags/ury.png
Binary files /dev/null and b/assets/images/flags/ury.png differ
assets/images/flags/vat.png
Binary files /dev/null and b/assets/images/flags/vat.png differ
assets/images/flags/vir.png
Binary files /dev/null and b/assets/images/flags/vir.png differ
assets/images/flags/vut.png
Binary files /dev/null and b/assets/images/flags/vut.png differ
lib/cake_pay/cake_pay_api.dart
+7
-3
@@ -3,6 +3,7 @@ import 'dart:convert';
3
import 'package:cake_wallet/cake_pay/cake_pay_order.dart';
4
import 'package:cake_wallet/cake_pay/cake_pay_user_credentials.dart';
5
import 'package:cake_wallet/cake_pay/cake_pay_vendor.dart';
6
+import 'package:cake_wallet/entities/country.dart';
7
import 'package:http/http.dart' as http;
8
9
class CakePayApi {
@@ -171,7 +172,7 @@ class CakePayApi {
172
}
173
174
/// Get Countries
174
- Future<List<String>> getCountries(
175
+ Future<List<Country>> getCountries(
176
{required String CSRFToken, required String authorization}) async {
177
final uri = Uri.https(baseCakePayUri, countriesPath);
178
@@ -188,8 +189,11 @@ class CakePayApi {
189
}
190
191
final bodyJson = json.decode(response.body) as List;
191
-
192
- return bodyJson.map<String>((country) => country['name'] as String).toList();
192
+ return bodyJson
193
+ .map<String>((country) => country['name'] as String)
194
+ .map((name) => Country.fromCakePayName(name))
195
+ .whereType<Country>()
196
+ .toList();
197
}
198
199
/// Get Vendors
lib/cake_pay/cake_pay_service.dart
+2
-1
@@ -3,6 +3,7 @@ import 'package:cake_wallet/cake_pay/cake_pay_api.dart';
3
import 'package:cake_wallet/cake_pay/cake_pay_order.dart';
4
import 'package:cake_wallet/cake_pay/cake_pay_vendor.dart';
5
import 'package:cake_wallet/core/secure_storage.dart';
6
+import 'package:cake_wallet/entities/country.dart';
7
8
class CakePayService {
9
CakePayService(this.secureStorage, this.cakePayApi);
@@ -23,7 +24,7 @@ class CakePayService {
24
final CakePayApi cakePayApi;
25
26
/// Get Available Countries
26
- Future<List<String>> getCountries() async =>
27
+ Future<List<Country>> getCountries() async =>
28
await cakePayApi.getCountries(CSRFToken: CSRFToken, authorization: authorization);
29
30
/// Get Vendors
lib/di.dart
+2
-1
@@ -1271,7 +1271,8 @@ Future<void> setup({
1271
() => CakePayService(getIt.get<SecureStorage>(), getIt.get<CakePayApi>()));
1272
1273
getIt.registerFactory(
1274
- () => CakePayCardsListViewModel(cakePayService: getIt.get<CakePayService>()));
1274
+ () => CakePayCardsListViewModel(cakePayService: getIt.get<CakePayService>(),
1275
+ settingsStore: getIt.get<SettingsStore>()));
1276
1277
getIt.registerFactory(() => CakePayAuthViewModel(cakePayService: getIt.get<CakePayService>()));
1278
lib/entities/country.dart
new
+386
@@ -0,0 +1,386 @@
1
+import 'package:cw_core/enumerable_item.dart';
2
+import 'package:collection/collection.dart';
3
+
4
+class Country extends EnumerableItem<String> with Serializable<String> {
5
+ const Country({required String code, required this.fullName, required this.countryCode})
6
+ : super(title: fullName, raw: code);
7
+
8
+ final String fullName;
9
+ final String countryCode;
10
+
11
+ static List<Country> get all => _all.values.toList();
12
+
13
+ static const afghanistan = Country(code: 'afg', countryCode: 'AF', fullName: "Afghanistan");
14
+ static const andorra = Country(code: 'and', countryCode: 'AD', fullName: "Andorra");
15
+ static const angola = Country(code: 'ago', countryCode: 'AO', fullName: "Angola");
16
+ static const anguilla = Country(code: 'aia', countryCode: 'AI', fullName: "Anguilla");
17
+ static const antigua_and_barbuda =
18
+ Country(code: 'atg', countryCode: 'AG', fullName: "Antigua and Barbuda");
19
+ static const are = Country(code: 'are', countryCode: 'AE', fullName: "United Arab Emirates");
20
+ static const arg = Country(code: 'arg', countryCode: 'AR', fullName: "Argentina");
21
+ static const arm = Country(code: 'arm', countryCode: 'AM', fullName: "Armenia");
22
+ static const aruba = Country(code: 'abw', countryCode: 'AW', fullName: "Aruba");
23
+ static const aus = Country(code: 'aus', countryCode: 'AU', fullName: "Australia");
24
+ static const aut = Country(code: 'aut', countryCode: 'AT', fullName: "Austria");
25
+ static const aze = Country(code: 'aze', countryCode: 'AZ', fullName: "Azerbaijan");
26
+ static const belize = Country(code: 'blz', countryCode: 'BZ', fullName: "Belize");
27
+ static const bfa = Country(code: 'bfa', countryCode: 'BF', fullName: "Burkina Faso");
28
+ static const bel = Country(code: 'bel', countryCode: 'BE', fullName: "Belgium");
29
+ static const bgd = Country(code: 'bgd', countryCode: 'BD', fullName: "Bangladesh");
30
+ static const bhr = Country(code: 'bhr', countryCode: 'BH', fullName: "Bahrain");
31
+ static const bhs = Country(code: 'bhs', countryCode: 'BS', fullName: "Bahamas");
32
+ static const bhutan = Country(code: 'btn', countryCode: 'BT', fullName: "Bhutan");
33
+ static const bol = Country(code: 'bol', countryCode: 'BO', fullName: "Bolivia");
34
+ static const bra = Country(code: 'bra', countryCode: 'BR', fullName: "Brazil");
35
+ static const brn = Country(code: 'brn', countryCode: 'BN', fullName: "Brunei");
36
+ static const bwa = Country(code: 'bwa', countryCode: 'BW', fullName: "Botswana");
37
+ static const cad = Country(code: 'cad', countryCode: 'CA', fullName: "Canada");
38
+ static const che = Country(code: 'che', countryCode: 'CH', fullName: "Switzerland");
39
+ static const chl = Country(code: 'chl', countryCode: 'CL', fullName: "Chile");
40
+ static const chn = Country(code: 'chn', countryCode: 'CN', fullName: "China");
41
+ static const col = Country(code: 'col', countryCode: 'CO', fullName: "Colombia");
42
+ static const cri = Country(code: 'cri', countryCode: 'CR', fullName: "Costa Rica");
43
+ static const cyp = Country(code: 'cyp', countryCode: 'CY', fullName: "Cyprus");
44
+ static const czk = Country(code: 'czk', countryCode: 'CZ', fullName: "Czech Republic");
45
+ static const deu = Country(code: 'deu', countryCode: 'DE', fullName: "Germany");
46
+ static const dji = Country(code: 'dji', countryCode: 'DJ', fullName: "Djibouti");
47
+ static const dnk = Country(code: 'dnk', countryCode: 'DK', fullName: "Denmark");
48
+ static const dza = Country(code: 'dza', countryCode: 'DZ', fullName: "Algeria");
49
+ static const ecu = Country(code: 'ecu', countryCode: 'EC', fullName: "Ecuador");
50
+ static const egy = Country(code: 'egy', countryCode: 'EG', fullName: "Egypt");
51
+ static const esp = Country(code: 'esp', countryCode: 'ES', fullName: "Spain");
52
+ static const est = Country(code: 'est', countryCode: 'EE', fullName: "Estonia");
53
+ static const eur = Country(code: 'eur', countryCode: 'EU', fullName: "European Union");
54
+ static const fin = Country(code: 'fin', countryCode: 'FI', fullName: "Finland");
55
+ static const fji = Country(code: 'fji', countryCode: 'FJ', fullName: "Fiji");
56
+ static const flk = Country(code: 'flk', countryCode: 'FK', fullName: "Falkland Islands");
57
+ static const fra = Country(code: 'fra', countryCode: 'FR', fullName: "France");
58
+ static const fsm = Country(code: 'fsm', countryCode: 'FM', fullName: "Micronesia");
59
+ static const gab = Country(code: 'gab', countryCode: 'GA', fullName: "Gabon");
60
+ static const gbr = Country(code: 'gbr', countryCode: 'GB', fullName: "United Kingdom");
61
+ static const geo = Country(code: 'geo', countryCode: 'GE', fullName: "Georgia");
62
+ static const gha = Country(code: 'gha', countryCode: 'GH', fullName: "Ghana");
63
+ static const grc = Country(code: 'grc', countryCode: 'GR', fullName: "Greece");
64
+ static const grd = Country(code: 'grd', countryCode: 'GD', fullName: "Grenada");
65
+ static const grl = Country(code: 'grl', countryCode: 'GL', fullName: "Greenland");
66
+ static const gtm = Country(code: 'gtm', countryCode: 'GT', fullName: "Guatemala");
67
+ static const guy = Country(code: 'guy', countryCode: 'GY', fullName: "Guyana");
68
+ static const hkg = Country(code: 'hkg', countryCode: 'HK', fullName: "Hong Kong");
69
+ static const hrv = Country(code: 'hrv', countryCode: 'HR', fullName: "Croatia");
70
+ static const hun = Country(code: 'hun', countryCode: 'HU', fullName: "Hungary");
71
+ static const idn = Country(code: 'idn', countryCode: 'ID', fullName: "Indonesia");
72
+ static const ind = Country(code: 'ind', countryCode: 'IN', fullName: "India");
73
+ static const irl = Country(code: 'irl', countryCode: 'IE', fullName: "Ireland");
74
+ static const irn = Country(code: 'irn', countryCode: 'IR', fullName: "Iran");
75
+ static const isl = Country(code: 'isl', countryCode: 'IS', fullName: "Iceland");
76
+ static const isr = Country(code: 'isr', countryCode: 'IL', fullName: "Israel");
77
+ static const ita = Country(code: 'ita', countryCode: 'IT', fullName: "Italy");
78
+ static const jam = Country(code: 'jam', countryCode: 'JM', fullName: "Jamaica");
79
+ static const jor = Country(code: 'jor', countryCode: 'JO', fullName: "Jordan");
80
+ static const jpn = Country(code: 'jpn', countryCode: 'JP', fullName: "Japan");
81
+ static const kaz = Country(code: 'kaz', countryCode: 'KZ', fullName: "Kazakhstan");
82
+ static const ken = Country(code: 'ken', countryCode: 'KE', fullName: "Kenya");
83
+ static const kir = Country(code: 'kir', countryCode: 'KI', fullName: "Kiribati");
84
+ static const kor = Country(code: 'kor', countryCode: 'KR', fullName: "South Korea");
85
+ static const kwt = Country(code: 'kwt', countryCode: 'KW', fullName: "Kuwait");
86
+ static const lie = Country(code: 'lie', countryCode: 'LI', fullName: "Liechtenstein");
87
+ static const lka = Country(code: 'lka', countryCode: 'LK', fullName: "Sri Lanka");
88
+ static const ltu = Country(code: 'ltu', countryCode: 'LT', fullName: "Lithuania");
89
+ static const lux = Country(code: 'lux', countryCode: 'LU', fullName: "Luxembourg");
90
+ static const lva = Country(code: 'lva', countryCode: 'LV', fullName: "Latvia");
91
+ static const mar = Country(code: 'mar', countryCode: 'MA', fullName: "Morocco");
92
+ static const mex = Country(code: 'mex', countryCode: 'MX', fullName: "Mexico");
93
+ static const mlt = Country(code: 'mlt', countryCode: 'MT', fullName: "Malta");
94
+ static const mnp = Country(code: 'mnp', countryCode: 'MP', fullName: "Northern Mariana Islands");
95
+ static const mtq = Country(code: 'mtq', countryCode: 'MQ', fullName: "Martinique");
96
+ static const mys = Country(code: 'mys', countryCode: 'MY', fullName: "Malaysia");
97
+ static const mwi = Country(code: 'mwi', countryCode: 'MW', fullName: "Malawi");
98
+ static const nga = Country(code: 'nga', countryCode: 'NG', fullName: "Nigeria");
99
+ static const niu = Country(code: 'niu', countryCode: 'NU', fullName: "Niue");
100
+ static const nld = Country(code: 'nld', countryCode: 'NL', fullName: "Netherlands");
101
+ static const nor = Country(code: 'nor', countryCode: 'NO', fullName: "Norway");
102
+ static const nzl = Country(code: 'nzl', countryCode: 'NZ', fullName: "New Zealand");
103
+ static const omn = Country(code: 'omn', countryCode: 'OM', fullName: "Oman");
104
+ static const pak = Country(code: 'pak', countryCode: 'PK', fullName: "Pakistan");
105
+ static const per = Country(code: 'per', countryCode: 'PE', fullName: "Peru");
106
+ static const phl = Country(code: 'phl', countryCode: 'PH', fullName: "Philippines");
107
+ static const pol = Country(code: 'pol', countryCode: 'PL', fullName: "Poland");
108
+ static const pri = Country(code: 'pri', countryCode: 'PR', fullName: "Puerto Rico");
109
+ static const prt = Country(code: 'prt', countryCode: 'PT', fullName: "Portugal");
110
+ static const qat = Country(code: 'qat', countryCode: 'QA', fullName: "Qatar");
111
+ static const rou = Country(code: 'rou', countryCode: 'RO', fullName: "Romania");
112
+ static const rus = Country(code: 'rus', countryCode: 'RU', fullName: "Russia");
113
+ static const saf = Country(code: 'saf', countryCode: 'ZA', fullName: "South Africa");
114
+ static const sau = Country(code: 'sau', countryCode: 'SA', fullName: "Saudi Arabia");
115
+ static const sgp = Country(code: 'sgp', countryCode: 'SG', fullName: "Singapore");
116
+ static const slb = Country(code: 'slb', countryCode: 'SB', fullName: "Solomon Islands");
117
+ static const svk = Country(code: 'svk', countryCode: 'SK', fullName: "Slovakia");
118
+ static const svn = Country(code: 'svn', countryCode: 'SI', fullName: "Slovenia");
119
+ static const swe = Country(code: 'swe', countryCode: 'SE', fullName: "Sweden");
120
+ static const tha = Country(code: 'tha', countryCode: 'TH', fullName: "Thailand");
121
+ static const tkm = Country(code: 'tkm', countryCode: 'TM', fullName: "Turkmenistan");
122
+ static const ton = Country(code: 'ton', countryCode: 'TO', fullName: "Tonga");
123
+ static const tur = Country(code: 'tur', countryCode: 'TR', fullName: "Turkey");
124
+ static const tuv = Country(code: 'tuv', countryCode: 'TV', fullName: "Tuvalu");
125
+ static const twn = Country(code: 'twn', countryCode: 'TW', fullName: "Taiwan");
126
+ static const ukr = Country(code: 'ukr', countryCode: 'UA', fullName: "Ukraine");
127
+ static const ury = Country(code: 'ury', countryCode: 'UY', fullName: "Uruguay");
128
+ static const usa = Country(code: 'usa', countryCode: 'US', fullName: "USA");
129
+ static const ven = Country(code: 'ven', countryCode: 'VE', fullName: "Venezuela");
130
+ static const vnm = Country(code: 'vnm', countryCode: 'VN', fullName: "Vietnam");
131
+ static const vut = Country(code: 'vut', countryCode: 'VU', fullName: "Vanuatu");
132
+ static const btn = Country(code: 'btn', countryCode: 'BT', fullName: "Bhutan");
133
+ static const bgr = Country(code: 'bgr', countryCode: 'BG', fullName: "Bulgaria");
134
+ static const guf = Country(code: 'guf', countryCode: 'GF', fullName: "French Guiana");
135
+ static const bes = Country(code: 'bes', countryCode: 'BQ', fullName: "Caribbean Netherlands");
136
+ static const fro = Country(code: 'fro', countryCode: 'FO', fullName: "Faroe Islands");
137
+ static const cuw = Country(code: 'cuw', countryCode: 'CW', fullName: "Curacao");
138
+ static const msr = Country(code: 'msr', countryCode: 'MS', fullName: "Montserrat");
139
+ static const cpv = Country(code: 'cpv', countryCode: 'CV', fullName: "Cabo Verde");
140
+ static const nfk = Country(code: 'nfk', countryCode: 'NF', fullName: "Norfolk Island");
141
+ static const bmu = Country(code: 'bmu', countryCode: 'BM', fullName: "Bermuda");
142
+ static const vat = Country(code: 'vat', countryCode: 'VA', fullName: "Vatican City");
143
+ static const aia = Country(code: 'aia', countryCode: 'AI', fullName: "Anguilla");
144
+ static const gum = Country(code: 'gum', countryCode: 'GU', fullName: "Guam");
145
+ static const myt = Country(code: 'myt', countryCode: 'YT', fullName: "Mayotte");
146
+ static const mrt = Country(code: 'mrt', countryCode: 'MR', fullName: "Mauritania");
147
+ static const ggy = Country(code: 'ggy', countryCode: 'GG', fullName: "Guernsey");
148
+ static const cck = Country(code: 'cck', countryCode: 'CC', fullName: "Cocos (Keeling) Islands");
149
+ static const blz = Country(code: 'blz', countryCode: 'BZ', fullName: "Belize");
150
+ static const cxr = Country(code: 'cxr', countryCode: 'CX', fullName: "Christmas Island");
151
+ static const mco = Country(code: 'mco', countryCode: 'MC', fullName: "Monaco");
152
+ static const ner = Country(code: 'ner', countryCode: 'NE', fullName: "Niger");
153
+ static const jey = Country(code: 'jey', countryCode: 'JE', fullName: "Jersey");
154
+ static const asm = Country(code: 'asm', countryCode: 'AS', fullName: "American Samoa");
155
+ static const gmb = Country(code: 'gmb', countryCode: 'GM', fullName: "Gambia");
156
+ static const dma = Country(code: 'dma', countryCode: 'DM', fullName: "Dominica");
157
+ static const glp = Country(code: 'glp', countryCode: 'GP', fullName: "Guadeloupe");
158
+ static const ggi = Country(code: 'ggi', countryCode: 'GI', fullName: "Gibraltar");
159
+ static const cmr = Country(code: 'cmr', countryCode: 'CM', fullName: "Cameroon");
160
+ static const atg = Country(code: 'atg', countryCode: 'AG', fullName: "Antigua and Barbuda");
161
+ static const slv = Country(code: 'slv', countryCode: 'SV', fullName: "El Salvador");
162
+ static const pyf = Country(code: 'pyf', countryCode: 'PF', fullName: "French Polynesia");
163
+ static const iot =
164
+ Country(code: 'iot', countryCode: 'IO', fullName: "British Indian Ocean Territory");
165
+ static const vir = Country(code: 'vir', countryCode: 'VI', fullName: "Virgin Islands (U.S.)");
166
+ static const abw = Country(code: 'abw', countryCode: 'AW', fullName: "Aruba");
167
+ static const ago = Country(code: 'ago', countryCode: 'AO', fullName: "Angola");
168
+ static const afg = Country(code: 'afg', countryCode: 'AF', fullName: "Afghanistan");
169
+ static const lbn = Country(code: 'lbn', countryCode: 'LB', fullName: "Lebanon");
170
+ static const hmd =
171
+ Country(code: 'hmd', countryCode: 'HM', fullName: "Heard Island and McDonald Islands");
172
+ static const cok = Country(code: 'cok', countryCode: 'CK', fullName: "Cook Islands");
173
+ static const bvt = Country(code: 'bvt', countryCode: 'BV', fullName: "Bouvet Island");
174
+ static const atf =
175
+ Country(code: 'atf', countryCode: 'TF', fullName: "French Southern Territories");
176
+ static const eth = Country(code: 'eth', countryCode: 'ET', fullName: "Ethiopia");
177
+ static const plw = Country(code: 'plw', countryCode: 'PW', fullName: "Palau");
178
+ static const ata = Country(code: 'ata', countryCode: 'AQ', fullName: "Antarctica");
179
+
180
+ static final _all = {
181
+ Country.afghanistan.raw: Country.afghanistan,
182
+ Country.andorra.raw: Country.andorra,
183
+ Country.angola.raw: Country.angola,
184
+ Country.anguilla.raw: Country.anguilla,
185
+ Country.antigua_and_barbuda.raw: Country.antigua_and_barbuda,
186
+ Country.are.raw: Country.are,
187
+ Country.arg.raw: Country.arg,
188
+ Country.arm.raw: Country.arm,
189
+ Country.aruba.raw: Country.aruba,
190
+ Country.aus.raw: Country.aus,
191
+ Country.aut.raw: Country.aut,
192
+ Country.aze.raw: Country.aze,
193
+ Country.belize.raw: Country.belize,
194
+ Country.bfa.raw: Country.bfa,
195
+ Country.bel.raw: Country.bel,
196
+ Country.bgd.raw: Country.bgd,
197
+ Country.bhr.raw: Country.bhr,
198
+ Country.bhs.raw: Country.bhs,
199
+ Country.bhutan.raw: Country.bhutan,
200
+ Country.bol.raw: Country.bol,
201
+ Country.bra.raw: Country.bra,
202
+ Country.brn.raw: Country.brn,
203
+ Country.bwa.raw: Country.bwa,
204
+ Country.cad.raw: Country.cad,
205
+ Country.che.raw: Country.che,
206
+ Country.chl.raw: Country.chl,
207
+ Country.chn.raw: Country.chn,
208
+ Country.col.raw: Country.col,
209
+ Country.cri.raw: Country.cri,
210
+ Country.cyp.raw: Country.cyp,
211
+ Country.czk.raw: Country.czk,
212
+ Country.deu.raw: Country.deu,
213
+ Country.dji.raw: Country.dji,
214
+ Country.dnk.raw: Country.dnk,
215
+ Country.dza.raw: Country.dza,
216
+ Country.ecu.raw: Country.ecu,
217
+ Country.egy.raw: Country.egy,
218
+ Country.esp.raw: Country.esp,
219
+ Country.est.raw: Country.est,
220
+ Country.eur.raw: Country.eur,
221
+ Country.fin.raw: Country.fin,
222
+ Country.fji.raw: Country.fji,
223
+ Country.flk.raw: Country.flk,
224
+ Country.fra.raw: Country.fra,
225
+ Country.fsm.raw: Country.fsm,
226
+ Country.gab.raw: Country.gab,
227
+ Country.gbr.raw: Country.gbr,
228
+ Country.geo.raw: Country.geo,
229
+ Country.gha.raw: Country.gha,
230
+ Country.grc.raw: Country.grc,
231
+ Country.grd.raw: Country.grd,
232
+ Country.grl.raw: Country.grl,
233
+ Country.gtm.raw: Country.gtm,
234
+ Country.guy.raw: Country.guy,
235
+ Country.hkg.raw: Country.hkg,
236
+ Country.hrv.raw: Country.hrv,
237
+ Country.hun.raw: Country.hun,
238
+ Country.idn.raw: Country.idn,
239
+ Country.ind.raw: Country.ind,
240
+ Country.irl.raw: Country.irl,
241
+ Country.irn.raw: Country.irn,
242
+ Country.isl.raw: Country.isl,
243
+ Country.isr.raw: Country.isr,
244
+ Country.ita.raw: Country.ita,
245
+ Country.jam.raw: Country.jam,
246
+ Country.jor.raw: Country.jor,
247
+ Country.jpn.raw: Country.jpn,
248
+ Country.kaz.raw: Country.kaz,
249
+ Country.ken.raw: Country.ken,
250
+ Country.kir.raw: Country.kir,
251
+ Country.kor.raw: Country.kor,
252
+ Country.kwt.raw: Country.kwt,
253
+ Country.lie.raw: Country.lie,
254
+ Country.lka.raw: Country.lka,
255
+ Country.ltu.raw: Country.ltu,
256
+ Country.lux.raw: Country.lux,
257
+ Country.lva.raw: Country.lva,
258
+ Country.mar.raw: Country.mar,
259
+ Country.mex.raw: Country.mex,
260
+ Country.mlt.raw: Country.mlt,
261
+ Country.mnp.raw: Country.mnp,
262
+ Country.mtq.raw: Country.mtq,
263
+ Country.mys.raw: Country.mys,
264
+ Country.mwi.raw: Country.mwi,
265
+ Country.nga.raw: Country.nga,
266
+ Country.niu.raw: Country.niu,
267
+ Country.nld.raw: Country.nld,
268
+ Country.nor.raw: Country.nor,
269
+ Country.nzl.raw: Country.nzl,
270
+ Country.omn.raw: Country.omn,
271
+ Country.pak.raw: Country.pak,
272
+ Country.per.raw: Country.per,
273
+ Country.phl.raw: Country.phl,
274
+ Country.pol.raw: Country.pol,
275
+ Country.pri.raw: Country.pri,
276
+ Country.prt.raw: Country.prt,
277
+ Country.qat.raw: Country.qat,
278
+ Country.rou.raw: Country.rou,
279
+ Country.rus.raw: Country.rus,
280
+ Country.saf.raw: Country.saf,
281
+ Country.sau.raw: Country.sau,
282
+ Country.sgp.raw: Country.sgp,
283
+ Country.slb.raw: Country.slb,
284
+ Country.svk.raw: Country.svk,
285
+ Country.svn.raw: Country.svn,
286
+ Country.swe.raw: Country.swe,
287
+ Country.tha.raw: Country.tha,
288
+ Country.tkm.raw: Country.tkm,
289
+ Country.ton.raw: Country.ton,
290
+ Country.tur.raw: Country.tur,
291
+ Country.tuv.raw: Country.tuv,
292
+ Country.twn.raw: Country.twn,
293
+ Country.ukr.raw: Country.ukr,
294
+ Country.ury.raw: Country.ury,
295
+ Country.usa.raw: Country.usa,
296
+ Country.ven.raw: Country.ven,
297
+ Country.vnm.raw: Country.vnm,
298
+ Country.vut.raw: Country.vut,
299
+ Country.btn.raw: Country.btn,
300
+ Country.bgr.raw: Country.bgr,
301
+ Country.guf.raw: Country.guf,
302
+ Country.bes.raw: Country.bes,
303
+ Country.fro.raw: Country.fro,
304
+ Country.cuw.raw: Country.cuw,
305
+ Country.msr.raw: Country.msr,
306
+ Country.cpv.raw: Country.cpv,
307
+ Country.nfk.raw: Country.nfk,
308
+ Country.bmu.raw: Country.bmu,
309
+ Country.vat.raw: Country.vat,
310
+ Country.aia.raw: Country.aia,
311
+ Country.gum.raw: Country.gum,
312
+ Country.myt.raw: Country.myt,
313
+ Country.mrt.raw: Country.mrt,
314
+ Country.ggy.raw: Country.ggy,
315
+ Country.cck.raw: Country.cck,
316
+ Country.blz.raw: Country.blz,
317
+ Country.cxr.raw: Country.cxr,
318
+ Country.mco.raw: Country.mco,
319
+ Country.ner.raw: Country.ner,
320
+ Country.jey.raw: Country.jey,
321
+ Country.asm.raw: Country.asm,
322
+ Country.gmb.raw: Country.gmb,
323
+ Country.dma.raw: Country.dma,
324
+ Country.glp.raw: Country.glp,
325
+ Country.ggi.raw: Country.ggi,
326
+ Country.cmr.raw: Country.cmr,
327
+ Country.atg.raw: Country.atg,
328
+ Country.slv.raw: Country.slv,
329
+ Country.pyf.raw: Country.pyf,
330
+ Country.iot.raw: Country.iot,
331
+ Country.vir.raw: Country.vir,
332
+ Country.abw.raw: Country.abw,
333
+ Country.ago.raw: Country.ago,
334
+ Country.afg.raw: Country.afg,
335
+ Country.lbn.raw: Country.lbn,
336
+ Country.hmd.raw: Country.hmd,
337
+ Country.cok.raw: Country.cok,
338
+ Country.bvt.raw: Country.bvt,
339
+ Country.atf.raw: Country.atf,
340
+ Country.eth.raw: Country.eth,
341
+ Country.plw.raw: Country.plw,
342
+ Country.ata.raw: Country.ata,
343
+ };
344
+
345
+ static final Map<String, String> _cakePayNames = {
346
+ 'Slovak Republic': 'Slovakia',
347
+ 'Brunei Darussalam': 'Brunei',
348
+ 'Federated States of Micronesia': 'Micronesia',
349
+ 'Sri lanka': 'Sri Lanka',
350
+ 'UAE': 'United Arab Emirates',
351
+ 'UK': 'United Kingdom',
352
+ 'Curaçao': "Curacao",
353
+ };
354
+
355
+ static Country deserialize({required String raw}) => _all[raw]!;
356
+
357
+ static final Map<String, Country> countryByName = {
358
+ for (var country in _all.values) country.fullName: country,
359
+ };
360
+
361
+ static Country? fromCakePayName(String name) {
362
+ final normalizedName = _cakePayNames[name] ?? name;
363
+ return countryByName[normalizedName];
364
+ }
365
+
366
+ static String getCakePayName(Country country) {
367
+ return _cakePayNames.entries
368
+ .firstWhere(
369
+ (entry) => entry.value == country.fullName,
370
+ orElse: () => MapEntry(country.fullName, country.fullName),
371
+ )
372
+ .key;
373
+ }
374
+
375
+ static Country? fromCode(String countryCode) {
376
+ return _all.values.firstWhereOrNull((element) => element.raw == countryCode.toLowerCase());
377
+ }
378
+
379
+ @override
380
+ bool operator ==(Object other) => other is Country && other.raw == raw;
381
+
382
+ @override
383
+ int get hashCode => raw.hashCode ^ title.hashCode;
384
+
385
+ String get iconPath => "assets/images/flags/$raw.png";
386
+}
lib/entities/preferences_key.dart
+1
@@ -12,6 +12,7 @@ class PreferencesKey {
12
static const currentBananoNodeIdKey = 'current_node_id_banano';
13
static const currentBananoPowNodeIdKey = 'current_node_id_banano_pow';
14
static const currentFiatCurrencyKey = 'current_fiat_currency';
15
+ static const currentCakePayCountry = 'current_cake_pay_country';
16
static const currentBitcoinCashNodeIdKey = 'current_node_id_bch';
17
static const currentSolanaNodeIdKey = 'current_node_id_sol';
18
static const currentTronNodeIdKey = 'current_node_id_trx';
lib/src/screens/cake_pay/cards/cake_pay_cards_page.dart
+116
-40
@@ -1,5 +1,6 @@
1
import 'package:cake_wallet/cake_pay/cake_pay_states.dart';
2
import 'package:cake_wallet/cake_pay/cake_pay_vendor.dart';
3
+import 'package:cake_wallet/entities/country.dart';
4
import 'package:cake_wallet/generated/i18n.dart';
5
import 'package:cake_wallet/routes.dart';
6
import 'package:cake_wallet/src/screens/base_page.dart';
@@ -8,6 +9,7 @@ import 'package:cake_wallet/src/screens/cake_pay/widgets/card_menu.dart';
9
import 'package:cake_wallet/src/screens/dashboard/widgets/filter_widget.dart';
10
import 'package:cake_wallet/src/widgets/cake_scrollbar.dart';
11
import 'package:cake_wallet/src/widgets/gradient_background.dart';
12
+import 'package:cake_wallet/src/widgets/picker.dart';
13
import 'package:cake_wallet/themes/extensions/balance_page_theme.dart';
14
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
15
import 'package:cake_wallet/themes/extensions/exchange_page_theme.dart';
@@ -20,6 +22,7 @@ import 'package:cake_wallet/utils/show_pop_up.dart';
22
import 'package:cake_wallet/view_model/cake_pay/cake_pay_cards_list_view_model.dart';
23
import 'package:flutter/material.dart';
24
import 'package:flutter_mobx/flutter_mobx.dart';
25
+import 'package:mobx/mobx.dart';
26
27
class CakePayCardsPage extends BasePage {
28
CakePayCardsPage(this._cardsListViewModel) : searchFocusNode = FocusNode() {
@@ -80,9 +83,25 @@ class CakePayCardsPage extends BasePage {
83
84
@override
85
Widget body(BuildContext context) {
86
+
87
+ if (_cardsListViewModel.settingsStore.selectedCakePayCountry == null) {
88
+ WidgetsBinding.instance.addPostFrameCallback((_) {
89
+ reaction((_) => _cardsListViewModel.shouldShowCountryPicker, (bool shouldShowCountryPicker) async {
90
+ if (shouldShowCountryPicker) {
91
+ _cardsListViewModel.storeInitialFilterStates();
92
+ await showCountryPicker(context, _cardsListViewModel);
93
+ if (_cardsListViewModel.hasFiltersChanged) {
94
+ _cardsListViewModel.resetLoadingNextPageState();
95
+ _cardsListViewModel.getVendors();
96
+ }
97
+ }
98
+ });
99
+ });
100
+ }
101
+
102
final filterButton = Semantics(
103
label: S.of(context).filter_by,
85
- child: InkWell(
104
+ child: GestureDetector(
105
onTap: () async {
106
_cardsListViewModel.storeInitialFilterStates();
107
await showFilterWidget(context);
@@ -92,50 +111,87 @@ class CakePayCardsPage extends BasePage {
111
}
112
},
113
child: Container(
95
- width: 32,
96
- padding: EdgeInsets.all(8),
97
- decoration: BoxDecoration(
98
- color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
99
- border: Border.all(
100
- color: Colors.white.withOpacity(0.2),
114
+ width: 32,
115
+ padding: EdgeInsets.all(8),
116
+ decoration: BoxDecoration(
117
+ color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
118
+ border: Border.all(
119
+ color: Colors.transparent,
120
+ ),
121
+ borderRadius: BorderRadius.circular(10),
122
),
102
- borderRadius: BorderRadius.circular(10),
103
- ),
104
- child: Image.asset(
105
- 'assets/images/filter.png',
106
- color: Theme.of(context).extension<FilterTheme>()!.iconColor,
123
+ child: Image.asset(
124
+ 'assets/images/filter.png',
125
+ color: Theme.of(context).extension<FilterTheme>()!.iconColor,
126
+ ))),
127
+ );
128
+ final _countryPicker = Semantics(
129
+ label: S.of(context).filter_by,
130
+ child: GestureDetector(
131
+ onTap: () async {
132
+ _cardsListViewModel.storeInitialFilterStates();
133
+ await showCountryPicker(context, _cardsListViewModel);
134
+ if (_cardsListViewModel.hasFiltersChanged) {
135
+ _cardsListViewModel.resetLoadingNextPageState();
136
+ _cardsListViewModel.getVendors();
137
+ }
138
+ },
139
+ child: Container(
140
+ padding: EdgeInsets.symmetric(horizontal: 6),
141
+ decoration: BoxDecoration(
142
+ color: Theme.of(context).extension<SyncIndicatorTheme>()!.syncedBackgroundColor,
143
+ border: Border.all(color: Colors.transparent),
144
+ borderRadius: BorderRadius.circular(10),
145
+ ),
146
+ child: Container(
147
+ margin: EdgeInsets.symmetric(vertical: 2),
148
+ child: Row(
149
+ children: [
150
+ Image.asset(
151
+ _cardsListViewModel.selectedCountry.iconPath,
152
+ width: 24,
153
+ height: 24,
154
+ errorBuilder: (context, error, stackTrace) => Container(
155
+ width: 24,
156
+ height: 24,
157
+ ),
158
+ ),
159
+ SizedBox(width: 6),
160
+ Text(
161
+ _cardsListViewModel.selectedCountry.countryCode,
162
+ style: TextStyle(
163
+ color: Theme.of(context).extension<DashboardPageTheme>()!.textColor,
164
+ fontSize: 16,
165
+ fontWeight: FontWeight.w700,
166
+ ),
167
+ ),
168
+ ],
169
),
108
- )),
170
+ ),
171
+ ),
172
+ ),
173
);
174
175
return Padding(
112
- padding: const EdgeInsets.all(14.0),
113
- child: Column(
114
- children: [
176
+ padding: const EdgeInsets.all(14.0),
177
+ child: Column(children: [
178
Container(
116
- padding: EdgeInsets.only(left: 2, right: 22),
117
- height: 32,
118
- child: Row(
119
- children: [
179
+ padding: EdgeInsets.only(left: 2, right: 22),
180
+ height: 32,
181
+ child: Row(children: [
182
Expanded(
183
child: _SearchWidget(
184
controller: _searchController,
185
focusNode: searchFocusNode,
186
)),
125
- SizedBox(width: 10),
126
- filterButton
127
- ],
128
- ),
129
- ),
187
+ SizedBox(width: 5),
188
+ filterButton,
189
+ SizedBox(width: 5),
190
+ _countryPicker
191
+ ])),
192
SizedBox(height: 8),
131
- Expanded(
132
- child: CakePayCardsPageBody(
133
- cardsListViewModel: _cardsListViewModel,
134
- ),
135
- ),
136
- ],
137
- ),
138
- );
193
+ Expanded(child: CakePayCardsPageBody(cardsListViewModel: _cardsListViewModel))
194
+ ]));
195
}
196
197
Future<void> showFilterWidget(BuildContext context) async {
@@ -148,6 +204,32 @@ class CakePayCardsPage extends BasePage {
204
}
205
}
206
207
+
208
+Future<void> showCountryPicker(BuildContext context, CakePayCardsListViewModel cardsListViewModel) async {
209
+ await showPopUp<void>(
210
+ context: context,
211
+ builder: (_) => Picker(
212
+ title: S.of(context).select_your_country,
213
+ items: cardsListViewModel.availableCountries,
214
+ images: cardsListViewModel.availableCountries
215
+ .map((e) => Image.asset(
216
+ e.iconPath,
217
+ errorBuilder: (context, error, stackTrace) => Container(
218
+ width: 58,
219
+ height: 58,
220
+ ),
221
+ ))
222
+ .toList(),
223
+ selectedAtIndex: cardsListViewModel.availableCountries
224
+ .indexOf(cardsListViewModel.selectedCountry),
225
+ onItemSelected: (Country country) =>
226
+ cardsListViewModel.setSelectedCountry(country),
227
+ isSeparated: false,
228
+ hintText: S.of(context).search,
229
+ matchingCriteria: (Country country, String searchText) =>
230
+ country.fullName.toLowerCase().contains(searchText.toLowerCase())));
231
+}
232
+
233
class CakePayCardsPageBody extends StatefulWidget {
234
const CakePayCardsPageBody({
235
Key? key,
@@ -304,15 +386,9 @@ class _SearchWidget extends StatelessWidget {
386
alignLabelWithHint: true,
387
floatingLabelBehavior: FloatingLabelBehavior.never,
388
suffixIcon: searchIcon,
307
- border: OutlineInputBorder(
308
- borderSide: BorderSide(
309
- color: Colors.white.withOpacity(0.2),
310
- ),
311
- borderRadius: BorderRadius.circular(10),
312
- ),
389
enabledBorder: OutlineInputBorder(
390
borderSide: BorderSide(
315
- color: Colors.white.withOpacity(0.2),
391
+ color: Colors.transparent,
392
),
393
borderRadius: BorderRadius.circular(10),
394
),
lib/src/screens/cake_pay/widgets/card_item.dart
+1
-1
@@ -9,7 +9,7 @@ class CardItem extends StatelessWidget {
9
required this.backgroundColor,
10
required this.titleColor,
11
required this.subtitleColor,
12
- this.hideBorder = false,
12
+ this.hideBorder = true,
13
this.discount = 0.0,
14
this.isAmount = false,
15
this.discountBackground,
lib/store/settings_store.dart
+24
-1
@@ -9,6 +9,7 @@ import 'package:cake_wallet/entities/auto_generate_subaddress_status.dart';
9
import 'package:cake_wallet/entities/background_tasks.dart';
10
import 'package:cake_wallet/entities/balance_display_mode.dart';
11
import 'package:cake_wallet/entities/cake_2fa_preset_options.dart';
12
+import 'package:cake_wallet/entities/country.dart';
13
import 'package:cake_wallet/entities/exchange_api_mode.dart';
14
import 'package:cake_wallet/entities/fiat_api_mode.dart';
15
import 'package:cake_wallet/entities/fiat_currency.dart';
@@ -128,7 +129,8 @@ abstract class SettingsStoreBase with Store {
129
TransactionPriority? initialLitecoinTransactionPriority,
130
TransactionPriority? initialEthereumTransactionPriority,
131
TransactionPriority? initialPolygonTransactionPriority,
131
- TransactionPriority? initialBitcoinCashTransactionPriority})
132
+ TransactionPriority? initialBitcoinCashTransactionPriority,
133
+ Country? initialCakePayCountry})
134
: nodes = ObservableMap<WalletType, Node>.of(nodes),
135
powNodes = ObservableMap<WalletType, Node>.of(powNodes),
136
_secureStorage = secureStorage,
@@ -213,6 +215,10 @@ abstract class SettingsStoreBase with Store {
215
priority[WalletType.bitcoinCash] = initialBitcoinCashTransactionPriority;
216
}
217
218
+ if (initialCakePayCountry != null) {
219
+ selectedCakePayCountry = initialCakePayCountry;
220
+ }
221
+
222
initializeTrocadorProviderStates();
223
224
WalletType.values.forEach((walletType) {
@@ -244,6 +250,15 @@ abstract class SettingsStoreBase with Store {
250
(FiatCurrency fiatCurrency) => sharedPreferences.setString(
251
PreferencesKey.currentFiatCurrencyKey, fiatCurrency.serialize()));
252
253
+ reaction(
254
+ (_) => selectedCakePayCountry,
255
+ (Country? country) {
256
+ if (country != null) {
257
+ sharedPreferences.setString(
258
+ PreferencesKey.currentCakePayCountry, country.raw);
259
+ }
260
+ });
261
+
262
reaction(
263
(_) => shouldShowYatPopup,
264
(bool shouldShowYatPopup) =>
@@ -625,6 +640,9 @@ abstract class SettingsStoreBase with Store {
640
@observable
641
FiatCurrency fiatCurrency;
642
643
+ @observable
644
+ Country? selectedCakePayCountry;
645
+
646
@observable
647
bool shouldShowYatPopup;
648
@@ -880,6 +898,10 @@ abstract class SettingsStoreBase with Store {
898
final backgroundTasks = getIt.get<BackgroundTasks>();
899
final currentFiatCurrency = FiatCurrency.deserialize(
900
raw: sharedPreferences.getString(PreferencesKey.currentFiatCurrencyKey)!);
901
+ final savedCakePayCountryRaw = sharedPreferences.getString(PreferencesKey.currentCakePayCountry);
902
+ final currentCakePayCountry = savedCakePayCountryRaw != null
903
+ ? Country.deserialize(raw: savedCakePayCountryRaw)
904
+ : null;
905
906
TransactionPriority? moneroTransactionPriority = monero?.deserializeMoneroTransactionPriority(
907
raw: sharedPreferences.getInt(PreferencesKey.moneroTransactionPriority)!);
@@ -1225,6 +1247,7 @@ abstract class SettingsStoreBase with Store {
1247
deviceName: deviceName,
1248
isBitcoinBuyEnabled: isBitcoinBuyEnabled,
1249
initialFiatCurrency: currentFiatCurrency,
1250
+ initialCakePayCountry: currentCakePayCountry,
1251
initialBalanceDisplayMode: currentBalanceDisplayMode,
1252
initialSaveRecipientAddress: shouldSaveRecipientAddress,
1253
initialAutoGenerateSubaddressStatus: autoGenerateSubaddressStatus,
lib/view_model/cake_pay/cake_pay_cards_list_view_model.dart
+34
-31
@@ -1,8 +1,10 @@
1
import 'package:cake_wallet/cake_pay/cake_pay_service.dart';
2
import 'package:cake_wallet/cake_pay/cake_pay_states.dart';
3
import 'package:cake_wallet/cake_pay/cake_pay_vendor.dart';
4
+import 'package:cake_wallet/entities/country.dart';
5
+import 'package:cake_wallet/entities/fiat_currency.dart';
6
import 'package:cake_wallet/generated/i18n.dart';
5
-import 'package:cake_wallet/view_model/dashboard/dropdown_filter_item.dart';
7
+import 'package:cake_wallet/store/settings_store.dart';
8
import 'package:cake_wallet/view_model/dashboard/filter_item.dart';
9
import 'package:mobx/mobx.dart';
10
@@ -13,11 +15,11 @@ class CakePayCardsListViewModel = CakePayCardsListViewModelBase with _$CakePayCa
15
abstract class CakePayCardsListViewModelBase with Store {
16
CakePayCardsListViewModelBase({
17
required this.cakePayService,
18
+ required this.settingsStore,
19
}) : cardState = CakePayCardsStateNoCards(),
20
cakePayVendors = [],
21
availableCountries = [],
22
page = 1,
20
- selectedCountry = 'USA',
23
displayPrepaidCards = true,
24
displayGiftCards = true,
25
displayDenominationsCards = true,
@@ -30,13 +32,20 @@ abstract class CakePayCardsListViewModelBase with Store {
32
initialization();
33
}
34
35
+ static Country _getInitialCountry(FiatCurrency fiatCurrency) {
36
+ if (fiatCurrency.countryCode == 'eur') {
37
+ return Country.deu;
38
+ }
39
+ return Country.fromCode(fiatCurrency.countryCode) ?? Country.usa;
40
+ }
41
+
42
void initialization() async {
43
await getCountries();
35
- selectedCountry = availableCountries.first;
44
getVendors();
45
}
46
47
final CakePayService cakePayService;
48
+ final SettingsStore settingsStore;
49
50
List<CakePayVendor> CakePayVendorList;
51
@@ -61,28 +70,15 @@ abstract class CakePayCardsListViewModelBase with Store {
70
caption: S.current.custom_value,
71
onChanged: toggleCustomValueCards),
72
],
64
- S.current.countries: [
65
- DropdownFilterItem(
66
- items: availableCountries,
67
- caption: '',
68
- selectedItem: selectedCountry,
69
- onItemSelected: (String value) => setSelectedCountry(value),
70
- ),
71
- ]
73
};
74
75
String searchString;
75
-
76
int page;
77
78
- late String _initialSelectedCountry;
79
-
78
+ late Country _initialSelectedCountry;
79
late bool _initialDisplayPrepaidCards;
81
-
80
late bool _initialDisplayGiftCards;
83
-
81
late bool _initialDisplayDenominationsCards;
85
-
82
late bool _initialDisplayCustomValueCards;
83
84
@observable
@@ -107,7 +103,7 @@ abstract class CakePayCardsListViewModelBase with Store {
103
List<CakePayVendor> cakePayVendors;
104
105
@observable
110
- List<String> availableCountries;
106
+ List<Country> availableCountries;
107
108
@observable
109
bool displayPrepaidCards;
@@ -121,15 +117,22 @@ abstract class CakePayCardsListViewModelBase with Store {
117
@observable
118
bool displayCustomValueCards;
119
124
- @observable
125
- String selectedCountry;
120
+ @computed
121
+ Country get selectedCountry =>
122
+ settingsStore.selectedCakePayCountry ?? _getInitialCountry(settingsStore.fiatCurrency);
123
+
124
+ @computed
125
+ bool get shouldShowCountryPicker => settingsStore.selectedCakePayCountry == null && availableCountries.isNotEmpty;
126
+
127
+
128
+ bool get hasFiltersChanged {
129
+ return selectedCountry != _initialSelectedCountry ||
130
+ displayPrepaidCards != _initialDisplayPrepaidCards ||
131
+ displayGiftCards != _initialDisplayGiftCards ||
132
+ displayDenominationsCards != _initialDisplayDenominationsCards ||
133
+ displayCustomValueCards != _initialDisplayCustomValueCards;
134
+ }
135
127
- bool get hasFiltersChanged =>
128
- selectedCountry != _initialSelectedCountry ||
129
- displayPrepaidCards != _initialDisplayPrepaidCards ||
130
- displayGiftCards != _initialDisplayGiftCards ||
131
- displayDenominationsCards != _initialDisplayDenominationsCards ||
132
- displayCustomValueCards != _initialDisplayCustomValueCards;
136
137
Future<void> getCountries() async {
138
availableCountries = await cakePayService.getCountries();
@@ -143,7 +146,7 @@ abstract class CakePayCardsListViewModelBase with Store {
146
vendorsState = CakePayVendorLoadingState();
147
searchString = text ?? '';
148
var newVendors = await cakePayService.getVendors(
146
- country: selectedCountry,
149
+ country: Country.getCakePayName(selectedCountry),
150
page: currentPage ?? page,
151
search: searchString,
152
giftCards: displayGiftCards,
@@ -152,20 +155,20 @@ abstract class CakePayCardsListViewModelBase with Store {
155
onDemand: displayDenominationsCards);
156
157
cakePayVendors = CakePayVendorList = newVendors;
155
-
158
vendorsState = CakePayVendorLoadedState();
159
}
160
161
@action
162
Future<void> fetchNextPage() async {
161
- if (vendorsState is CakePayVendorLoadingState || !hasMoreDataToFetch || isLoadingNextPage)
163
+ if (vendorsState is CakePayVendorLoadingState || !hasMoreDataToFetch || isLoadingNextPage) {
164
return;
165
+ }
166
167
isLoadingNextPage = true;
168
page++;
169
try {
170
var newVendors = await cakePayService.getVendors(
168
- country: selectedCountry,
171
+ country: Country.getCakePayName(selectedCountry),
172
page: page,
173
search: searchString,
174
giftCards: displayGiftCards,
@@ -201,7 +204,7 @@ abstract class CakePayCardsListViewModelBase with Store {
204
}
205
206
@action
204
- void setSelectedCountry(String country) => selectedCountry = country;
207
+ void setSelectedCountry(Country country) => settingsStore.selectedCakePayCountry = country;
208
209
@action
210
void togglePrepaidCards() => displayPrepaidCards = !displayPrepaidCards;
res/values/strings_ar.arb
+1
@@ -634,6 +634,7 @@
634
"select_buy_provider_notice": "حدد مزود شراء أعلاه. يمكنك تخطي هذه الشاشة عن طريق تعيين مزود شراء الافتراضي في إعدادات التطبيق.",
635
"select_destination": ".ﻲﻃﺎﻴﺘﺣﻻﺍ ﺦﺴﻨﻟﺍ ﻒﻠﻣ ﺔﻬﺟﻭ ﺪﻳﺪﺤﺗ ءﺎﺟﺮﻟﺍ",
636
"select_sell_provider_notice": ".ﻖﻴﺒﻄﺘﻟﺍ ﺕﺍﺩﺍﺪﻋﺇ ﻲﻓ ﻚﺑ ﺹﺎﺨﻟﺍ ﻲﺿﺍﺮﺘﻓﻻﺍ ﻊﻴﺒﻟﺍ ﺩﻭﺰﻣ ﻦﻴﻴﻌﺗ ﻖﻳﺮﻃ ﻦﻋ ﺔﺷﺎﺸﻟﺍ ﻩﺬﻫ ﻲﻄﺨﺗ",
637
+ "select_your_country": "الرجاء تحديد بلدك",
638
"sell": "بيع",
639
"sell_alert_content": ".ﺎﻬﻴﻟﺇ ﻞﻳﺪﺒﺘﻟﺍ ﻭﺃ Litecoin ﻭﺃ Ethereum ﻭﺃ Bitcoin ﺔﻈﻔﺤﻣ ءﺎﺸﻧﺇ ﻰﺟﺮﻳ .Litecoin ﻭ",
640
"sell_monero_com_alert_content": "بيع Monero غير مدعوم حتى الآن",
res/values/strings_bg.arb
+1
@@ -634,6 +634,7 @@
634
"select_buy_provider_notice": "Изберете доставчик на покупка по -горе. Можете да пропуснете този екран, като зададете вашия доставчик по подразбиране по подразбиране в настройките на приложението.",
635
"select_destination": "Моля, изберете дестинация за архивния файл.",
636
"select_sell_provider_notice": "Изберете доставчик на продажба по-горе. Можете да пропуснете този екран, като зададете своя доставчик на продажба по подразбиране в настройките на приложението.",
637
+ "select_your_country": "Моля, изберете вашата страна",
638
"sell": "Продаване",
639
"sell_alert_content": "В момента поддържаме само продажбата на Bitcoin, Ethereum и Litecoin. Моля, създайте или превключете към своя портфейл Bitcoin, Ethereum или Litecoin.",
640
"sell_monero_com_alert_content": "Продажбата на Monero все още не се поддържа",
res/values/strings_cs.arb
+1
@@ -634,6 +634,7 @@
634
"select_buy_provider_notice": "Vyberte výše uvedeného poskytovatele nákupu. Tuto obrazovku můžete přeskočit nastavením výchozího poskytovatele nákupu v nastavení aplikace.",
635
"select_destination": "Vyberte cíl pro záložní soubor.",
636
"select_sell_provider_notice": "Výše vyberte poskytovatele prodeje. Tuto obrazovku můžete přeskočit nastavením výchozího poskytovatele prodeje v nastavení aplikace.",
637
+ "select_your_country": "Vyberte prosím svou zemi",
638
"sell": "Prodat",
639
"sell_alert_content": "V současné době podporujeme pouze prodej bitcoinů, etherea a litecoinů. Vytvořte nebo přepněte na svou bitcoinovou, ethereum nebo litecoinovou peněženku.",
640
"sell_monero_com_alert_content": "Prodej Monero zatím není podporován",
res/values/strings_de.arb
+1
@@ -635,6 +635,7 @@
635
"select_buy_provider_notice": "Wählen Sie oben einen Anbieter kaufen. Sie können diese Seite überspringen, indem Sie Ihren Standard-Kaufanbieter in den App-Einstellungen festlegen.",
636
"select_destination": "Bitte wählen Sie das Ziel für die Sicherungsdatei aus.",
637
"select_sell_provider_notice": "Wählen Sie oben einen Verkaufsanbieter aus. Sie können diesen Bildschirm überspringen, indem Sie in den App-Einstellungen Ihren Standard-Verkaufsanbieter festlegen.",
638
+ "select_your_country": "Bitte wählen Sie Ihr Land aus",
639
"sell": "Verkaufen",
640
"sell_alert_content": "Wir unterstützen derzeit nur den Verkauf von Bitcoin, Ethereum und Litecoin. Bitte erstellen Sie Ihr Bitcoin-, Ethereum- oder Litecoin-Wallet oder wechseln Sie zu diesem.",
641
"sell_monero_com_alert_content": "Der Verkauf von Monero wird noch nicht unterstützt",
res/values/strings_en.arb
+1
@@ -636,6 +636,7 @@
636
"select_buy_provider_notice": "Select a buy provider above. You can skip this screen by setting your default buy provider in app settings.",
637
"select_destination": "Please select destination for the backup file.",
638
"select_sell_provider_notice": "Select a sell provider above. You can skip this screen by setting your default sell provider in app settings.",
639
+ "select_your_country": "Please select your country",
640
"sell": "Sell",
641
"sell_alert_content": "We currently only support the sale of Bitcoin, Ethereum and Litecoin. Please create or switch to your Bitcoin, Ethereum or Litecoin wallet.",
642
"sell_monero_com_alert_content": "Selling Monero is not supported yet",
res/values/strings_es.arb
+1
@@ -635,6 +635,7 @@
635
"select_buy_provider_notice": "Selecciona un proveedor de compra arriba. Puede omitir esta pantalla configurando su proveedor de compra predeterminado en la configuración de la aplicación.",
636
"select_destination": "Selecciona el destino del archivo de copia de seguridad.",
637
"select_sell_provider_notice": "Selecciona un proveedor de venta arriba. Puede omitir esta pantalla configurando su proveedor de venta predeterminado en la configuración de la aplicación.",
638
+ "select_your_country": "Seleccione su país",
639
"sell": "Vender",
640
"sell_alert_content": "Actualmente solo admitimos la venta de Bitcoin, Ethereum y Litecoin. Cree o cambie a su billetera Bitcoin, Ethereum o Litecoin.",
641
"sell_monero_com_alert_content": "Aún no se admite la venta de Monero",
res/values/strings_fr.arb
+1
@@ -634,6 +634,7 @@
634
"select_buy_provider_notice": "Sélectionnez un fournisseur d'achat ci-dessus. Vous pouvez ignorer cet écran en définissant votre fournisseur d'achat par défaut dans les paramètres de l'application.",
635
"select_destination": "Veuillez sélectionner la destination du fichier de sauvegarde.",
636
"select_sell_provider_notice": "Sélectionnez un fournisseur de vente ci-dessus. Vous pouvez ignorer cet écran en définissant votre fournisseur de vente par défaut dans les paramètres de l'application.",
637
+ "select_your_country": "Veuillez sélectionner votre pays",
638
"sell": "Vendre",
639
"sell_alert_content": "Nous ne prenons actuellement en charge que la vente de Bitcoin, Ethereum et Litecoin. Veuillez créer ou basculer vers votre portefeuille Bitcoin, Ethereum ou Litecoin.",
640
"sell_monero_com_alert_content": "La vente de Monero n'est pas encore prise en charge",
res/values/strings_ha.arb
+1
@@ -636,6 +636,7 @@
636
"select_buy_provider_notice": "Zaɓi mai ba da kyauta a sama. Zaka iya tsallake wannan allon ta hanyar saita mai ba da isasshen busasshen mai ba da isasshen busasshiyar saiti.",
637
"select_destination": "Da fatan za a zaɓi wurin da za a yi wa madadin fayil ɗin.",
638
"select_sell_provider_notice": "Zaɓi mai bada siyarwa a sama. Kuna iya tsallake wannan allon ta saita mai bada siyar da ku a cikin saitunan app.",
639
+ "select_your_country": "Da fatan za a zabi ƙasarku",
640
"sell": "sayar",
641
"sell_alert_content": "A halin yanzu muna tallafawa kawai siyar da Bitcoin, Ethereum da Litecoin. Da fatan za a ƙirƙiri ko canza zuwa walat ɗin ku na Bitcoin, Ethereum ko Litecoin.",
642
"sell_monero_com_alert_content": "Selling Monero bai sami ƙarshen mai bukatar samun ba",
res/values/strings_hi.arb
+1
@@ -636,6 +636,7 @@
636
"select_buy_provider_notice": "ऊपर एक खरीद प्रदाता का चयन करें। आप इस स्क्रीन को ऐप सेटिंग्स में अपना डिफ़ॉल्ट बाय प्रदाता सेट करके छोड़ सकते हैं।",
637
"select_destination": "कृपया बैकअप फ़ाइल के लिए गंतव्य का चयन करें।",
638
"select_sell_provider_notice": "ऊपर एक विक्रय प्रदाता का चयन करें। आप ऐप सेटिंग में अपना डिफ़ॉल्ट विक्रय प्रदाता सेट करके इस स्क्रीन को छोड़ सकते हैं।",
639
+ "select_your_country": "कृपया अपने देश का चयन करें",
640
"sell": "बेचना",
641
"sell_alert_content": "हम वर्तमान में केवल बिटकॉइन, एथेरियम और लाइटकॉइन की बिक्री का समर्थन करते हैं। कृपया अपना बिटकॉइन, एथेरियम या लाइटकॉइन वॉलेट बनाएं या उसमें स्विच करें।",
642
"sell_monero_com_alert_content": "मोनेरो बेचना अभी तक समर्थित नहीं है",
res/values/strings_hr.arb
+1
@@ -634,6 +634,7 @@
634
"select_buy_provider_notice": "Odaberite gornji davatelj kupnje. Ovaj zaslon možete preskočiti postavljanjem zadanog davatelja usluga kupnje u postavkama aplikacija.",
635
"select_destination": "Odaberite odredište za datoteku sigurnosne kopije.",
636
"select_sell_provider_notice": "Gore odaberite pružatelja usluga prodaje. Ovaj zaslon možete preskočiti postavljanjem zadanog pružatelja usluga prodaje u postavkama aplikacije.",
637
+ "select_your_country": "Odaberite svoju zemlju",
638
"sell": "Prodavati",
639
"sell_alert_content": "Trenutno podržavamo samo prodaju Bitcoina, Ethereuma i Litecoina. Izradite ili prijeđite na svoj Bitcoin, Ethereum ili Litecoin novčanik.",
640
"sell_monero_com_alert_content": "Prodaja Monera još nije podržana",
res/values/strings_hy.arb
+1
@@ -626,6 +626,7 @@
626
"select_buy_provider_notice": "Ընտրեք գնման մատակարարը վերևում։ Դուք կարող եք բաց թողնել այս էկրանը ձեր լռելայն գնման մատակարարը հավելվածի կարգավորումներում սահմանելով",
627
"select_destination": "Խնդրում ենք ընտրել կրկնօրինակ ֆայլի նպատակակետը",
628
"select_sell_provider_notice": "Ընտրեք վաճառքի մատակարարը վերևում։ Դուք կարող եք բաց թողնել այս էկրանը ձեր լռելայն վաճառքի մատակարարը հավելվածի կարգավորումներում սահմանելով",
629
+ "select_your_country": "Խնդրում ենք ընտրել ձեր երկիրը",
630
"sell": "Ծախել",
631
"sell_alert_content": "Մենք ներկայումս պաշտպանում ենք միայն Bitcoin, Ethereum և Litecoin վաճառքը։ Խնդրում ենք ստեղծել կամ միացնել ձեր Bitcoin, Ethereum կամ Litecoin դրամապանակը",
632
"sell_monero_com_alert_content": "Monero-ի վաճառքը դեռ չի պաշտպանվում",
res/values/strings_id.arb
+1
@@ -637,6 +637,7 @@
637
"select_buy_provider_notice": "Pilih penyedia beli di atas. Anda dapat melewatkan layar ini dengan mengatur penyedia pembelian default Anda di pengaturan aplikasi.",
638
"select_destination": "Silakan pilih tujuan untuk file cadangan.",
639
"select_sell_provider_notice": "Pilih penyedia jual di atas. Anda dapat melewati layar ini dengan mengatur penyedia penjualan default Anda di pengaturan aplikasi.",
640
+ "select_your_country": "Pilih negara Anda",
641
"sell": "Jual",
642
"sell_alert_content": "Saat ini kami hanya mendukung penjualan Bitcoin, Ethereum, dan Litecoin. Harap buat atau alihkan ke dompet Bitcoin, Ethereum, atau Litecoin Anda.",
643
"sell_monero_com_alert_content": "Menjual Monero belum didukung",
res/values/strings_it.arb
+1
@@ -636,6 +636,7 @@
636
"select_buy_provider_notice": "Seleziona un fornitore di acquisto sopra. È possibile saltare questa schermata impostando il provider di acquisto predefinito nelle impostazioni dell'app.",
637
"select_destination": "Seleziona la destinazione per il file di backup.",
638
"select_sell_provider_notice": "Seleziona un fornitore di vendita sopra. Puoi saltare questa schermata impostando il tuo fornitore di vendita predefinito nelle impostazioni dell'app.",
639
+ "select_your_country": "Seleziona il tuo paese",
640
"sell": "Vendere",
641
"sell_alert_content": "Al momento supportiamo solo la vendita di Bitcoin, Ethereum e Litecoin. Crea o passa al tuo portafoglio Bitcoin, Ethereum o Litecoin.",
642
"sell_monero_com_alert_content": "La vendita di Monero non è ancora supportata",
res/values/strings_ja.arb
+1
@@ -635,6 +635,7 @@
635
"select_buy_provider_notice": "上記の購入プロバイダーを選択してください。デフォルトの購入プロバイダーをアプリ設定で設定して、この画面をスキップできます。",
636
"select_destination": "バックアップファイルの保存先を選択してください。",
637
"select_sell_provider_notice": "上記の販売プロバイダーを選択してください。アプリ設定でデフォルトの販売プロバイダーを設定することで、この画面をスキップできます。",
638
+ "select_your_country": "あなたの国を選択してください",
639
"sell": "売る",
640
"sell_alert_content": "現在、ビットコイン、イーサリアム、ライトコインの販売のみをサポートしています。ビットコイン、イーサリアム、またはライトコインのウォレットを作成するか、これらのウォレットに切り替えてください。",
641
"sell_monero_com_alert_content": "モネロの販売はまだサポートされていません",
res/values/strings_ko.arb
+1
@@ -635,6 +635,7 @@
635
"select_buy_provider_notice": "위의 구매 제공자를 선택하십시오. 앱 설정에서 기본 구매 제공자를 설정 하여이 화면을 건너 뛸 수 있습니다.",
636
"select_destination": "백업 파일의 대상을 선택하십시오.",
637
"select_sell_provider_notice": "위에서 판매 공급자를 선택하세요. 앱 설정에서 기본 판매 공급자를 설정하면 이 화면을 건너뛸 수 있습니다.",
638
+ "select_your_country": "국가를 선택하십시오",
639
"sell": "팔다",
640
"sell_alert_content": "현재 Bitcoin, Ethereum 및 Litecoin의 판매만 지원합니다. Bitcoin, Ethereum 또는 Litecoin 지갑을 생성하거나 전환하십시오.",
641
"sell_monero_com_alert_content": "지원되지 않습니다.",
res/values/strings_my.arb
+1
@@ -634,6 +634,7 @@
634
"select_buy_provider_notice": "အပေါ်ကဝယ်သူတစ် ဦး ကိုရွေးချယ်ပါ။ သင်၏ default 0 ယ်သူအား app settings တွင် setting လုပ်ခြင်းဖြင့်ဤ screen ကိုကျော်သွားနိုင်သည်။",
635
"select_destination": "အရန်ဖိုင်အတွက် ဦးတည်ရာကို ရွေးပါ။",
636
"select_sell_provider_notice": "အထက်ဖော်ပြပါ အရောင်းဝန်ဆောင်မှုပေးသူကို ရွေးပါ။ အက်ပ်ဆက်တင်များတွင် သင်၏မူလရောင်းချပေးသူကို သတ်မှတ်ခြင်းဖြင့် ဤစခရင်ကို ကျော်နိုင်သည်။",
637
+ "select_your_country": "ကျေးဇူးပြု. သင့်နိုင်ငံကိုရွေးချယ်ပါ",
638
"sell": "ရောင်း",
639
"sell_alert_content": "ကျွန်ုပ်တို့သည် လက်ရှိတွင် Bitcoin၊ Ethereum နှင့် Litecoin ရောင်းချခြင်းကိုသာ ပံ့ပိုးပေးပါသည်။ သင်၏ Bitcoin၊ Ethereum သို့မဟုတ် Litecoin ပိုက်ဆံအိတ်ကို ဖန်တီးပါ သို့မဟုတ် ပြောင်းပါ။",
640
"sell_monero_com_alert_content": "Monero ရောင်းချခြင်းကို မပံ့ပိုးရသေးပါ။",
res/values/strings_nl.arb
+1
@@ -634,6 +634,7 @@
634
"select_buy_provider_notice": "Selecteer hierboven een koopprovider. U kunt dit scherm overslaan door uw standaard kopenprovider in te stellen in app -instellingen.",
635
"select_destination": "Selecteer de bestemming voor het back-upbestand.",
636
"select_sell_provider_notice": "Selecteer hierboven een verkoopaanbieder. U kunt dit scherm overslaan door uw standaardverkoopprovider in te stellen in de app-instellingen.",
637
+ "select_your_country": "Selecteer uw land",
638
"sell": "Verkopen",
639
"sell_alert_content": "We ondersteunen momenteel alleen de verkoop van Bitcoin, Ethereum en Litecoin. Maak of schakel over naar uw Bitcoin-, Ethereum- of Litecoin-portemonnee.",
640
"sell_monero_com_alert_content": "Het verkopen van Monero wordt nog niet ondersteund",
res/values/strings_pl.arb
+1
@@ -634,6 +634,7 @@
634
"select_buy_provider_notice": "Wybierz powyższe dostawcę zakupu. Możesz pominąć ten ekran, ustawiając domyślnego dostawcę zakupu w ustawieniach aplikacji.",
635
"select_destination": "Wybierz miejsce docelowe dla pliku kopii zapasowej.",
636
"select_sell_provider_notice": "Wybierz dostawcę sprzedaży powyżej. Możesz pominąć ten ekran, ustawiając domyślnego dostawcę sprzedaży w ustawieniach aplikacji.",
637
+ "select_your_country": "Wybierz swój kraj",
638
"sell": "Sprzedać",
639
"sell_alert_content": "Obecnie obsługujemy tylko sprzedaż Bitcoin, Ethereum i Litecoin. Utwórz lub przełącz się na swój portfel Bitcoin, Ethereum lub Litecoin.",
640
"sell_monero_com_alert_content": "Sprzedaż Monero nie jest jeszcze obsługiwana",
res/values/strings_pt.arb
+1
@@ -636,6 +636,7 @@
636
"select_buy_provider_notice": "Selecione um provedor de compra acima. Você pode pular esta tela definindo seu provedor de compra padrão nas configurações de aplicativos.",
637
"select_destination": "Selecione o destino para o arquivo de backup.",
638
"select_sell_provider_notice": "Selecione um fornecedor de venda acima. Você pode pular esta tela definindo seu provedor de venda padrão nas configurações do aplicativo.",
639
+ "select_your_country": "Selecione seu país",
640
"sell": "Vender",
641
"sell_alert_content": "Atualmente, oferecemos suporte apenas à venda de Bitcoin, Ethereum e Litecoin. Crie ou troque para sua carteira Bitcoin, Ethereum ou Litecoin.",
642
"sell_monero_com_alert_content": "A venda de Monero ainda não é suportada",
res/values/strings_ru.arb
+1
@@ -635,6 +635,7 @@
635
"select_buy_provider_notice": "Выберите поставщика покупки выше. Вы можете пропустить этот экран, установив поставщика покупки по умолчанию в настройках приложения.",
636
"select_destination": "Пожалуйста, выберите место для файла резервной копии.",
637
"select_sell_provider_notice": "Выберите поставщика услуг продажи выше. Вы можете пропустить этот экран, установив поставщика услуг продаж по умолчанию в настройках приложения.",
638
+ "select_your_country": "Пожалуйста, выберите свою страну",
639
"sell": "Продавать",
640
"sell_alert_content": "В настоящее время мы поддерживаем только продажу биткойнов, эфириума и лайткойна. Пожалуйста, создайте или переключитесь на свой кошелек Bitcoin, Ethereum или Litecoin.",
641
"sell_monero_com_alert_content": "Продажа Monero пока не поддерживается",
res/values/strings_th.arb
+1
@@ -634,6 +634,7 @@
634
"select_buy_provider_notice": "เลือกผู้ให้บริการซื้อด้านบน คุณสามารถข้ามหน้าจอนี้ได้โดยการตั้งค่าผู้ให้บริการซื้อเริ่มต้นในการตั้งค่าแอป",
635
"select_destination": "โปรดเลือกปลายทางสำหรับไฟล์สำรอง",
636
"select_sell_provider_notice": "เลือกผู้ให้บริการการขายด้านบน คุณสามารถข้ามหน้าจอนี้ได้โดยการตั้งค่าผู้ให้บริการการขายเริ่มต้นในการตั้งค่าแอป",
637
+ "select_your_country": "กรุณาเลือกประเทศของคุณ",
638
"sell": "ขาย",
639
"sell_alert_content": "ขณะนี้เรารองรับการขาย Bitcoin, Ethereum และ Litecoin เท่านั้น โปรดสร้างหรือเปลี่ยนเป็นกระเป๋าเงิน Bitcoin, Ethereum หรือ Litecoin ของคุณ",
640
"sell_monero_com_alert_content": "ยังไม่รองรับการขาย Monero",
res/values/strings_tl.arb
+1
@@ -634,6 +634,7 @@
634
"select_buy_provider_notice": "Pumili ng provider ng pagbili sa itaas. Maaari mong laktawan ang screen na ito sa pamamagitan ng pagtatakda ng iyong default na provider ng pagbili sa mga setting ng app.",
635
"select_destination": "Mangyaring piliin ang patutunguhan para sa backup na file.",
636
"select_sell_provider_notice": "Pumili ng provider ng nagbebenta sa itaas. Maaari mong laktawan ang screen na ito sa pamamagitan ng pagtatakda ng iyong default na sell provider sa mga setting ng app.",
637
+ "select_your_country": "Mangyaring piliin ang iyong bansa",
638
"sell": "Ibenta",
639
"sell_alert_content": "Kasalukuyan lamang naming sinusuportahan ang pagbebenta ng Bitcoin, Ethereum at Litecoin. Mangyaring lumikha o lumipat sa iyong Bitcoin, Ethereum o Litecoin wallet.",
640
"sell_monero_com_alert_content": "Ang pagbebenta ng Monero ay hindi pa suportado",
res/values/strings_tr.arb
+1
@@ -634,6 +634,7 @@
634
"select_buy_provider_notice": "Yukarıda bir satın alma sağlayıcısı seçin. App ayarlarında varsayılan satın alma sağlayıcınızı ayarlayarak bu ekranı atlayabilirsiniz.",
635
"select_destination": "Lütfen yedekleme dosyası için hedef seçin.",
636
"select_sell_provider_notice": "Yukarıdan bir satış sağlayıcısı seçin. Uygulama ayarlarında varsayılan satış sağlayıcınızı ayarlayarak bu ekranı atlayabilirsiniz.",
637
+ "select_your_country": "Lütfen ülkenizi seçin",
638
"sell": "Satış",
639
"sell_alert_content": "Şu anda yalnızca Bitcoin, Ethereum ve Litecoin satışını destekliyoruz. Lütfen Bitcoin, Ethereum veya Litecoin cüzdanınızı oluşturun veya cüzdanınıza geçin.",
640
"sell_monero_com_alert_content": "Monero satışı henüz desteklenmiyor",
res/values/strings_uk.arb
+1
@@ -635,6 +635,7 @@
635
"select_buy_provider_notice": "Виберіть постачальника купівлі вище. Ви можете пропустити цей екран, встановивши свого постачальника купівлі за замовчуванням у налаштуваннях додатків.",
636
"select_destination": "Виберіть місце призначення для файлу резервної копії.",
637
"select_sell_provider_notice": "Виберіть вище постачальника послуг продажу. Ви можете пропустити цей екран, встановивши постачальника послуг продажу за умовчанням у налаштуваннях програми.",
638
+ "select_your_country": "Будь ласка, виберіть свою країну",
639
"sell": "Продати",
640
"sell_alert_content": "Наразі ми підтримуємо лише продаж Bitcoin, Ethereum і Litecoin. Створіть або перейдіть на свій гаманець Bitcoin, Ethereum або Litecoin.",
641
"sell_monero_com_alert_content": "Продаж Monero ще не підтримується",
res/values/strings_ur.arb
+1
@@ -636,6 +636,7 @@
636
"select_buy_provider_notice": "اوپر خریدنے والا خریدنے والا منتخب کریں۔ آپ ایپ کی ترتیبات میں اپنے پہلے سے طے شدہ خریدنے والے کو ترتیب دے کر اس اسکرین کو چھوڑ سکتے ہیں۔",
637
"select_destination": "۔ﮟﯾﺮﮐ ﺏﺎﺨﺘﻧﺍ ﺎﮐ ﻝﺰﻨﻣ ﮯﯿﻟ ﮯﮐ ﻞﺋﺎﻓ ﭖﺍ ﮏﯿﺑ ﻡﺮﮐ ﮦﺍﺮﺑ",
638
"select_sell_provider_notice": "۔ﮟﯿﮨ ﮯﺘﮑﺳ ﮌﻮﮭﭼ ﻮﮐ ﻦﯾﺮﮑﺳﺍ ﺱﺍ ﺮﮐ ﮮﺩ ﺐﯿﺗﺮﺗ ﻮﮐ ﮦﺪﻨﻨﮐ ﻢﮨﺍﺮﻓ ﻞﯿﺳ ﭧﻟﺎﻔﯾﮈ ﮯﻨﭘﺍ ﮟﯿﻣ ﺕﺎﺒ",
639
+ "select_your_country": "براہ کرم اپنے ملک کو منتخب کریں",
640
"sell": "بیچنا",
641
"sell_alert_content": "۔ﮟﯾﺮﮐ ﭻﺋﻮﺳ ﺮﭘ ﺱﺍ ﺎﯾ ﮟﯿﺋﺎﻨﺑ ﭧﯿﻟﺍﻭ Litecoin ﺎﯾ Bitcoin، Ethereum ﺎﻨﭘﺍ ﻡﺮﮐ ﮦﺍﺮﺑ ۔",
642
"sell_monero_com_alert_content": "Monero فروخت کرنا ابھی تک تعاون یافتہ نہیں ہے۔",
res/values/strings_vi.arb
+1
@@ -627,6 +627,7 @@
627
"select_buy_provider_notice": "Chọn nhà cung cấp mua ở trên. Bạn có thể bỏ qua màn hình này bằng cách thiết lập nhà cung cấp mua mặc định trong cài đặt ứng dụng.",
628
"select_destination": "Vui lòng chọn đích cho tệp sao lưu.",
629
"select_sell_provider_notice": "Chọn nhà cung cấp bán ở trên. Bạn có thể bỏ qua màn hình này bằng cách thiết lập nhà cung cấp bán mặc định trong cài đặt ứng dụng.",
630
+ "select_your_country": "Vui lòng chọn quốc gia của bạn",
631
"sell": "Bán",
632
"sell_alert_content": "Hiện tại chúng tôi chỉ hỗ trợ bán Bitcoin, Ethereum và Litecoin. Vui lòng tạo hoặc chuyển sang ví Bitcoin, Ethereum hoặc Litecoin của bạn.",
633
"sell_monero_com_alert_content": "Bán Monero chưa được hỗ trợ",
res/values/strings_yo.arb
+1
@@ -635,6 +635,7 @@
635
"select_buy_provider_notice": "Yan olupese Ra loke. O le skii iboju yii nipa ṣiṣeto olupese rẹ ni awọn eto App.",
636
"select_destination": "Jọwọ yan ibi ti o nlo fun faili afẹyinti.",
637
"select_sell_provider_notice": "Yan olupese ti o ta loke. O le foju iboju yii nipa tito olupese iṣẹ tita aiyipada rẹ ni awọn eto app.",
638
+ "select_your_country": "Jọwọ yan orilẹ-ede rẹ",
639
"sell": "Tà",
640
"sell_alert_content": "Lọwọlọwọ a ṣe atilẹyin tita Bitcoin, Ethereum ati Litecoin nikan. Jọwọ ṣẹda tabi yipada si Bitcoin, Ethereum tabi apamọwọ Litecoin rẹ.",
641
"sell_monero_com_alert_content": "Kọ ju lọwọ Monero ko ṣe ni ibamu",
res/values/strings_zh.arb
+1
@@ -634,6 +634,7 @@
634
"select_buy_provider_notice": "在上面选择买入提供商。您可以通过在应用程序设置中设置默认的购买提供商来跳过此屏幕。",
635
"select_destination": "请选择备份文件的目的地。",
636
"select_sell_provider_notice": "选择上面的销售提供商。您可以通过在应用程序设置中设置默认销售提供商来跳过此屏幕。",
637
+ "select_your_country": "请选择你的国家",
638
"sell": "卖",
639
"sell_alert_content": "我们目前仅支持比特币、以太坊和莱特币的销售。请创建或切换到您的比特币、以太坊或莱特币钱包。",
640
"sell_monero_com_alert_content": "尚不支持出售门罗币",