minor: add examples for address resolver scheme [skip ci]
OmarHatem committed
Dec 18, 2024 at 19:55 UTC
301cb3b7e0f9f92c4df7d6a9e32d5b18f589cb6c
1 file changed
+2
lib/entities/parse_address_from_domain.dart
+2
@@ -134,6 +134,7 @@ class AddressResolver {
134
Future<ParsedAddress> resolve(BuildContext context, String text, CryptoCurrency currency) async {
135
final ticker = currency.title;
136
try {
137
+ // twitter handle example: @username
138
if (text.startsWith('@') && !text.substring(1).contains('@')) {
139
if (settingsStore.lookupsTwitter) {
140
final formattedName = text.substring(1);
@@ -165,6 +166,7 @@ class AddressResolver {
166
}
167
}
168
169
+ // Mastodon example: @username@hostname.xxx
170
if (text.startsWith('@') && text.contains('@', 1) && text.contains('.', 1)) {
171
if (settingsStore.lookupsMastodon) {
172
final subText = text.substring(1);