fix openAlias resolver not being reached
OmarHatem committed
Dec 30, 2024 at 20:58 UTC
eb8c6a76e232bc2b98895ef1d0dd4b9dc86a1a6b
1 file changed
+16
-1
lib/entities/parse_address_from_domain.dart
+16
-1
@@ -244,7 +244,9 @@ class AddressResolver {
244
if (unstoppableDomains.any((domain) => name.trim() == domain)) {
245
if (settingsStore.lookupsUnstoppableDomains) {
246
final address = await fetchUnstoppableDomainAddress(text, ticker);
247
- return ParsedAddress.fetchUnstoppableDomainAddress(address: address, name: text);
247
+ if (address.isNotEmpty) {
248
+ return ParsedAddress.fetchUnstoppableDomainAddress(address: address, name: text);
249
+ }
250
}
251
}
252
@@ -257,12 +259,25 @@ class AddressResolver {
259
}
260
}
261
262
+ print("@@@@@@@@");
263
+ print(formattedName);
264
+ print(domainParts);
265
+ print(name);
266
+
267
if (formattedName.contains(".")) {
268
if (settingsStore.lookupsOpenAlias) {
269
final txtRecord = await OpenaliasRecord.lookupOpenAliasRecord(formattedName);
270
+
271
+ print("@@@@@@@@");
272
+ print(txtRecord);
273
if (txtRecord != null) {
274
final record = await OpenaliasRecord.fetchAddressAndName(
275
formattedName: formattedName, ticker: ticker.toLowerCase(), txtRecord: txtRecord);
276
+ print("@@@@@@@@");
277
+ print(record);
278
+ print(record.name);
279
+ print(record.address);
280
+ print(record.description);
281
return ParsedAddress.fetchOpenAliasAddress(record: record, name: text);
282
}
283
}