CAKE-192 | implemented unstoppable domain address to the app

This commit is contained in:
OleksandrSobol
2021-04-20 20:49:53 +03:00
parent 5faf7f5cba
commit ae9efb0ae8
29 changed files with 327 additions and 46 deletions
@@ -4,6 +4,7 @@ import 'package:cake_wallet/bitcoin/bitcoin_wallet.dart';
import 'package:cake_wallet/core/wallet_base.dart';
import 'package:cake_wallet/entities/crypto_currency.dart';
import 'package:cake_wallet/entities/sync_status.dart';
import 'package:cake_wallet/entities/unstoppable_domain_address.dart';
import 'package:cake_wallet/entities/wallet_type.dart';
import 'package:cake_wallet/exchange/exchange_provider.dart';
import 'package:cake_wallet/exchange/limits.dart';
@@ -417,4 +418,8 @@ abstract class ExchangeViewModelBase with Store {
}*/
isReceiveAmountEditable = false;
}
Future<String> getUnstoppableDomainAddress(String domain, String ticker) async {
return await fetchUnstoppableDomainAddress(domain, ticker.toLowerCase());
}
}
+5
View File
@@ -4,6 +4,7 @@ import 'package:cake_wallet/entities/balance_display_mode.dart';
import 'package:cake_wallet/entities/calculate_fiat_amount_raw.dart';
import 'package:cake_wallet/entities/transaction_description.dart';
import 'package:cake_wallet/entities/transaction_priority.dart';
import 'package:cake_wallet/entities/unstoppable_domain_address.dart';
import 'package:cake_wallet/monero/monero_amount_format.dart';
import 'package:cake_wallet/view_model/settings/settings_view_model.dart';
import 'package:hive/hive.dart';
@@ -267,6 +268,10 @@ abstract class SendViewModelBase with Store {
return record.name != name ? record : null;
}
Future<String> getUnstoppableDomainAddress(String domain) async {
return await fetchUnstoppableDomainAddress(domain, currency.title.toLowerCase());
}
@action
void _updateFiatAmount() {
try {