CW-425 use the open alias new line UI (#1004)

* CW-425 Display Contact Name in the send view

* CW-425 Ignore false positives on OpenAlias
This commit is contained in:
Konstantin Ullrich 2023-08-01 14:00:00 +02:00 committed by GitHub
parent 962074c093
commit cfaa89d165
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 89 additions and 94 deletions

View file

@ -17,6 +17,8 @@ import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/generated/i18n.dart';
import 'package:cake_wallet/bitcoin/bitcoin.dart';
import 'package:cake_wallet/entities/contact_base.dart';
part 'output.g.dart';
const String cryptoNumberPattern = '0.0';
@ -70,7 +72,7 @@ abstract class OutputBase with Store {
int amount = 0;
try {
if (cryptoAmount?.isNotEmpty ?? false) {
if (cryptoAmount.isNotEmpty) {
final _cryptoAmount = cryptoAmount.replaceAll(',', '.');
int _amount = 0;
switch (walletType) {
@ -240,4 +242,11 @@ abstract class OutputBase with Store {
extractedAddress = await extractAddressFromParsed(context, parsedAddress);
note = parsedAddress.description;
}
void loadContact(ContactBase contact) {
address = contact.name;
parsedAddress = ParsedAddress.fetchContactAddress(address: contact.address, name: contact.name);
extractedAddress = parsedAddress.addresses.first;
note = parsedAddress.description;
}
}