CAKE-360 | merged all yat branches into current; saving information about yat to connected wallet; fixed qr widget; applied yat, unstoppable domains and open alias to contact book

This commit is contained in:
OleksandrSobol
2021-10-01 18:13:10 +03:00
parent 5389543988
commit f353442a2a
26 changed files with 789 additions and 113 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import 'package:cake_wallet/entities/openalias_record.dart';
import 'package:cake_wallet/entities/parsed_address.dart';
import 'package:cake_wallet/entities/unstoppable_domain_address.dart';
import 'package:cake_wallet/yat/yat_record.dart';
import 'package:cake_wallet/store/yat/yat_store.dart';
const unstoppableDomains = [
'crypto',
+17 -3
View File
@@ -7,7 +7,8 @@ part 'wallet_info.g.dart';
@HiveType(typeId: WalletInfo.typeId)
class WalletInfo extends HiveObject {
WalletInfo(this.id, this.name, this.type, this.isRecovery, this.restoreHeight,
this.timestamp, this.dirPath, this.path, this.address);
this.timestamp, this.dirPath, this.path, this.address, this.yatEid,
this.yatRefreshToken);
factory WalletInfo.external(
{@required String id,
@@ -18,9 +19,12 @@ class WalletInfo extends HiveObject {
@required DateTime date,
@required String dirPath,
@required String path,
@required String address}) {
@required String address,
String yatEid ='',
String yatRefreshToken = ''}) {
return WalletInfo(id, name, type, isRecovery, restoreHeight,
date.millisecondsSinceEpoch ?? 0, dirPath, path, address);
date.millisecondsSinceEpoch ?? 0, dirPath, path, address,
yatEid, yatRefreshToken);
}
static const typeId = 4;
@@ -56,5 +60,15 @@ class WalletInfo extends HiveObject {
@HiveField(10)
Map<String, String> addresses;
@HiveField(11)
String yatEid;
@HiveField(12)
String yatRefreshToken;
String get yatEmojiId => yatEid ?? '';
String get yatToken => yatRefreshToken ?? '';
DateTime get date => DateTime.fromMillisecondsSinceEpoch(timestamp);
}