From 301cb3b7e0f9f92c4df7d6a9e32d5b18f589cb6c Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Wed, 18 Dec 2024 19:55:48 +0200 Subject: [PATCH] minor: add examples for address resolver scheme [skip ci] --- lib/entities/parse_address_from_domain.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/entities/parse_address_from_domain.dart b/lib/entities/parse_address_from_domain.dart index 54fa4e75a..5c5075737 100644 --- a/lib/entities/parse_address_from_domain.dart +++ b/lib/entities/parse_address_from_domain.dart @@ -134,6 +134,7 @@ class AddressResolver { Future resolve(BuildContext context, String text, CryptoCurrency currency) async { final ticker = currency.title; try { + // twitter handle example: @username if (text.startsWith('@') && !text.substring(1).contains('@')) { if (settingsStore.lookupsTwitter) { final formattedName = text.substring(1); @@ -165,6 +166,7 @@ class AddressResolver { } } + // Mastodon example: @username@hostname.xxx if (text.startsWith('@') && text.contains('@', 1) && text.contains('.', 1)) { if (settingsStore.lookupsMastodon) { final subText = text.substring(1);