mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-04 12:34:14 +01:00
CAKE-359 | added text field for extracted (from Yat, Unstoppable Domains, OpenAlias) address to send_card.dart; added extractedAddress and isParsedAddress parameters to output.dart; applied extractedAddress to monero_wallet.dart and electrum_wallet.dart; added TextValidator to send_view_model.dart
This commit is contained in:
@@ -47,8 +47,16 @@ abstract class OutputBase with Store {
|
||||
@observable
|
||||
bool sendAll;
|
||||
|
||||
@observable
|
||||
ParsedAddress parsedAddress;
|
||||
|
||||
@observable
|
||||
String extractedAddress;
|
||||
|
||||
@computed
|
||||
bool get isParsedAddress => parsedAddress.parseFrom != ParseFrom.notParsed
|
||||
&& parsedAddress.name.isNotEmpty;
|
||||
|
||||
@computed
|
||||
int get formattedCryptoAmount {
|
||||
int amount = 0;
|
||||
@@ -134,6 +142,7 @@ abstract class OutputBase with Store {
|
||||
}
|
||||
|
||||
void resetParsedAddress() {
|
||||
extractedAddress = '';
|
||||
parsedAddress = ParsedAddress(addresses: []);
|
||||
}
|
||||
|
||||
@@ -206,6 +215,6 @@ abstract class OutputBase with Store {
|
||||
final domain = address;
|
||||
final ticker = _wallet.currency.title.toLowerCase();
|
||||
parsedAddress = await parseAddressFromDomain(domain, ticker);
|
||||
address = await defineAddress(context, parsedAddress);
|
||||
extractedAddress = await defineAddress(context, parsedAddress);
|
||||
}
|
||||
}
|
||||
@@ -117,6 +117,8 @@ abstract class SendViewModelBase with Store {
|
||||
|
||||
Validator get addressValidator => AddressValidator(type: _wallet.currency);
|
||||
|
||||
Validator get textValidator => TextValidator();
|
||||
|
||||
@observable
|
||||
PendingTransaction pendingTransaction;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user