From eb8c6a76e232bc2b98895ef1d0dd4b9dc86a1a6b Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Mon, 30 Dec 2024 20:58:58 +0200 Subject: [PATCH] fix openAlias resolver not being reached --- lib/entities/parse_address_from_domain.dart | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/entities/parse_address_from_domain.dart b/lib/entities/parse_address_from_domain.dart index 5c5075737..258ebf485 100644 --- a/lib/entities/parse_address_from_domain.dart +++ b/lib/entities/parse_address_from_domain.dart @@ -244,7 +244,9 @@ class AddressResolver { if (unstoppableDomains.any((domain) => name.trim() == domain)) { if (settingsStore.lookupsUnstoppableDomains) { final address = await fetchUnstoppableDomainAddress(text, ticker); - return ParsedAddress.fetchUnstoppableDomainAddress(address: address, name: text); + if (address.isNotEmpty) { + return ParsedAddress.fetchUnstoppableDomainAddress(address: address, name: text); + } } } @@ -257,12 +259,25 @@ class AddressResolver { } } + print("@@@@@@@@"); + print(formattedName); + print(domainParts); + print(name); + if (formattedName.contains(".")) { if (settingsStore.lookupsOpenAlias) { final txtRecord = await OpenaliasRecord.lookupOpenAliasRecord(formattedName); + + print("@@@@@@@@"); + print(txtRecord); if (txtRecord != null) { final record = await OpenaliasRecord.fetchAddressAndName( formattedName: formattedName, ticker: ticker.toLowerCase(), txtRecord: txtRecord); + print("@@@@@@@@"); + print(record); + print(record.name); + print(record.address); + print(record.description); return ParsedAddress.fetchOpenAliasAddress(record: record, name: text); } }