mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-29 04:49:51 +00:00
Re add chatwoot (#1044)
* Revert "Revert "Cw 397 chatwoot live support (#1011)""
This reverts commit ecdc7baa2e
.
* Re-add chatwoot
Change chatwoot base url
This commit is contained in:
parent
ad6edd9a05
commit
5ec930cbc6
63 changed files with 762 additions and 260 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue