mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-20 06:08:34 +02:00
Re add chatwoot (#1044)
* Revert "Revert "Cw 397 chatwoot live support (#1011)"" This reverts commit ecdc7baa2e3c8f46c3c5013f56c8b864f088ec9f. * Re-add chatwoot Change chatwoot base url
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:cw_core/crypto_currency.dart';
|
||||
import 'package:cake_wallet/utils/mobx.dart';
|
||||
import 'package:cw_core/hive_type_ids.dart';
|
||||
import 'package:cw_core/keyable.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
|
||||
part 'contact.g.dart';
|
||||
|
||||
@@ -14,7 +13,7 @@ class Contact extends HiveObject with Keyable {
|
||||
}
|
||||
}
|
||||
|
||||
static const typeId = 0;
|
||||
static const typeId = CONTACT_TYPE_ID;
|
||||
static const boxName = 'Contacts';
|
||||
|
||||
@HiveField(0, defaultValue: '')
|
||||
|
||||
@@ -1,23 +1,18 @@
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:cw_core/cake_hive.dart';
|
||||
|
||||
Future<List<int>> getEncryptionKey(
|
||||
{required String forKey, required FlutterSecureStorage secureStorage}) async {
|
||||
final stringifiedKey =
|
||||
await secureStorage.read(key: 'transactionDescriptionsBoxKey');
|
||||
final stringifiedKey = await secureStorage.read(key: 'transactionDescriptionsBoxKey');
|
||||
List<int> key;
|
||||
|
||||
if (stringifiedKey == null) {
|
||||
key = Hive.generateSecureKey();
|
||||
key = CakeHive.generateSecureKey();
|
||||
final keyStringified = key.join(',');
|
||||
await secureStorage.write(
|
||||
key: 'transactionDescriptionsBoxKey', value: keyStringified);
|
||||
await secureStorage.write(key: 'transactionDescriptionsBoxKey', value: keyStringified);
|
||||
} else {
|
||||
key = stringifiedKey
|
||||
.split(',')
|
||||
.map((i) => int.parse(i))
|
||||
.toList();
|
||||
key = stringifiedKey.split(',').map((i) => int.parse(i)).toList();
|
||||
}
|
||||
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:cw_core/hive_type_ids.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
|
||||
part 'template.g.dart';
|
||||
@@ -14,7 +15,7 @@ class Template extends HiveObject {
|
||||
required this.amountFiatRaw,
|
||||
this.additionalRecipientsRaw});
|
||||
|
||||
static const typeId = 6;
|
||||
static const typeId = TEMPLATE_TYPE_ID;
|
||||
static const boxName = 'Template';
|
||||
|
||||
@HiveField(0)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:cw_core/hive_type_ids.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
|
||||
part 'transaction_description.g.dart';
|
||||
@@ -6,7 +7,7 @@ part 'transaction_description.g.dart';
|
||||
class TransactionDescription extends HiveObject {
|
||||
TransactionDescription({required this.id, this.recipientAddress, this.transactionNote});
|
||||
|
||||
static const typeId = 2;
|
||||
static const typeId = TRANSACTION_TYPE_ID;
|
||||
static const boxName = 'TransactionDescriptions';
|
||||
static const boxKey = 'transactionDescriptionsBoxKey';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user