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:
@@ -0,0 +1,4 @@
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:hive/src/hive_impl.dart';
|
||||
|
||||
final HiveInterface CakeHive = HiveImpl();
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:cw_core/crypto_currency.dart';
|
||||
import 'package:cw_core/hive_type_ids.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
|
||||
part 'erc20_token.g.dart';
|
||||
@@ -53,7 +54,7 @@ class Erc20Token extends CryptoCurrency with HiveObjectMixin {
|
||||
iconPath: icon,
|
||||
);
|
||||
|
||||
static const typeId = 12;
|
||||
static const typeId = ERC20_TOKEN_TYPE_ID;
|
||||
static const boxName = 'Erc20Tokens';
|
||||
|
||||
@override
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
const CONTACT_TYPE_ID = 0;
|
||||
const NODE_TYPE_ID = 1;
|
||||
const TRANSACTION_TYPE_ID = 2;
|
||||
const TRADE_TYPE_ID = 3;
|
||||
const WALLET_INFO_TYPE_ID = 4;
|
||||
const WALLET_TYPE_TYPE_ID = 5;
|
||||
const TEMPLATE_TYPE_ID = 6;
|
||||
const EXCHANGE_TEMPLATE_TYPE_ID = 7;
|
||||
const ORDER_TYPE_ID = 8;
|
||||
const UNSPENT_COINS_INFO_TYPE_ID = 9;
|
||||
const ANONPAY_INVOICE_INFO_TYPE_ID = 10;
|
||||
|
||||
const ERC20_TOKEN_TYPE_ID = 12;
|
||||
@@ -3,6 +3,7 @@ import 'package:cw_core/keyable.dart';
|
||||
import 'dart:convert';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:cw_core/hive_type_ids.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
import 'package:http/io_client.dart' as ioc;
|
||||
|
||||
@@ -37,7 +38,7 @@ class Node extends HiveObject with Keyable {
|
||||
trusted = map['trusted'] as bool? ?? false,
|
||||
socksProxyAddress = map['socksProxyPort'] as String?;
|
||||
|
||||
static const typeId = 1;
|
||||
static const typeId = NODE_TYPE_ID;
|
||||
static const boxName = 'Nodes';
|
||||
|
||||
@HiveField(0, defaultValue: '')
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:cw_core/hive_type_ids.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
|
||||
part 'unspent_coins_info.g.dart';
|
||||
@@ -14,7 +15,7 @@ class UnspentCoinsInfo extends HiveObject {
|
||||
required this.vout,
|
||||
required this.value});
|
||||
|
||||
static const typeId = 9;
|
||||
static const typeId = UNSPENT_COINS_INFO_TYPE_ID;
|
||||
static const boxName = 'Unspent';
|
||||
static const boxKey = 'unspentBoxKey';
|
||||
|
||||
@@ -45,4 +46,4 @@ class UnspentCoinsInfo extends HiveObject {
|
||||
String get note => noteRaw ?? '';
|
||||
|
||||
set note(String value) => noteRaw = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
import 'dart:async';
|
||||
import 'package:cw_core/hive_type_ids.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
|
||||
part 'wallet_info.g.dart';
|
||||
|
||||
@@ -30,7 +30,7 @@ class WalletInfo extends HiveObject {
|
||||
yatEid, yatLastUsedAddressRaw, showIntroCakePayCard);
|
||||
}
|
||||
|
||||
static const typeId = 4;
|
||||
static const typeId = WALLET_INFO_TYPE_ID;
|
||||
static const boxName = 'WalletInfo';
|
||||
|
||||
@HiveField(0, defaultValue: '')
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:cw_core/crypto_currency.dart';
|
||||
import 'package:cw_core/hive_type_ids.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
|
||||
part 'wallet_type.g.dart';
|
||||
@@ -10,9 +11,8 @@ const walletTypes = [
|
||||
WalletType.haven,
|
||||
WalletType.ethereum,
|
||||
];
|
||||
const walletTypeTypeId = 5;
|
||||
|
||||
@HiveType(typeId: walletTypeTypeId)
|
||||
@HiveType(typeId: WALLET_TYPE_TYPE_ID)
|
||||
enum WalletType {
|
||||
@HiveField(0)
|
||||
monero,
|
||||
|
||||
Reference in New Issue
Block a user