mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-02 12:14:09 +01:00
Change to parentheses
This way we don't need to translate and create different strings for the "on", which will appear odd in languages other than English. I also added it for FIO and OpenAlias. Further, I removed the 1 instance of openalias_alert_title. It can be removed from the localization file if/when it's convenient. I did NOT change anything for Unstoppable, because that appeared to touch a dependency. That has its own custom (but similar) text response
This commit is contained in:
@@ -45,14 +45,14 @@ class AddressResolver {
|
||||
final twitterUser = await TwitterApi.lookupUserByName(userName: formattedName);
|
||||
final address = extractAddressByType(raw: twitterUser.description ?? '', type: CryptoCurrency.fromString(ticker));
|
||||
if (address != null) {
|
||||
return ParsedAddress.fetchTwitterAddress(address: address, name: '$text on Twitter');
|
||||
return ParsedAddress.fetchTwitterAddress(address: address, name: '$text (Twitter)');
|
||||
}
|
||||
}
|
||||
if (!text.startsWith('@') && text.contains('@') && !text.contains('.')) {
|
||||
final bool isFioRegistered = await FioAddressProvider.checkAvail(text);
|
||||
if (isFioRegistered) {
|
||||
final address = await FioAddressProvider.getPubAddress(text, ticker);
|
||||
return ParsedAddress.fetchFioAddress(address: address, name: text);
|
||||
return ParsedAddress.fetchFioAddress(address: address, name: '$text (FIO)');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -77,7 +77,7 @@ class AddressResolver {
|
||||
|
||||
final record = await OpenaliasRecord.fetchAddressAndName(
|
||||
formattedName: formattedName, ticker: ticker);
|
||||
return ParsedAddress.fetchOpenAliasAddress(record: record, name: text);
|
||||
return ParsedAddress.fetchOpenAliasAddress(record: record, name: '$text (OpenAlias)');
|
||||
|
||||
} catch (e) {
|
||||
print(e.toString());
|
||||
|
||||
Reference in New Issue
Block a user