mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
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:
@@ -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',
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user