CAKE-356 | fixed _fetchEmojiFromUri method in the main.dart and fetchYatAddress method in the yat_record.dart
OleksandrSobol committed
Sep 17, 2021 at 11:14 UTC
7fd4772121b171cdfb3ae67fe4107dc228327cae
2 files changed
+7
-2
lib/main.dart
+2
-2
@@ -228,11 +228,11 @@ class AppState extends State<App> with SingleTickerProviderStateMixin {
228
229
void _fetchEmojiFromUri(Uri uri, YatStore yatStore) {
230
final queryParameters = uri.queryParameters;
231
- if (queryParameters == null || queryParameters.isEmpty) {
231
+ if (queryParameters?.isEmpty ?? true) {
232
return;
233
}
234
final emoji = queryParameters['eid'];
235
- if (emoji == null || emoji.isEmpty) {
235
+ if (emoji?.isEmpty ?? true) {
236
return;
237
}
238
yatStore.emoji = emoji;
lib/yat/yat_record.dart
+5
@@ -20,5 +20,10 @@ Future<String> fetchYatAddress(String emojiId, String ticker) async {
20
}
21
22
final yatAddress = result.first['data'] as String;
23
+
24
+ if (yatAddress?.isEmpty ?? true) {
25
+ return '';
26
+ }
27
+
28
return yatAddress;
29
}
\ No newline at end of file