mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
Allow marking Monero Nodes as trusted
This commit is contained in:
parent
40e4f7de1f
commit
d748f12e44
18 changed files with 47 additions and 6 deletions
|
@ -20,7 +20,8 @@ class Node extends HiveObject with Keyable {
|
|||
@required WalletType type,
|
||||
this.login,
|
||||
this.password,
|
||||
this.useSSL}) {
|
||||
this.useSSL,
|
||||
this.trusted}) {
|
||||
uriRaw = uri;
|
||||
this.type = type;
|
||||
}
|
||||
|
@ -30,7 +31,8 @@ class Node extends HiveObject with Keyable {
|
|||
login = map['login'] as String,
|
||||
password = map['password'] as String,
|
||||
typeRaw = map['typeRaw'] as int,
|
||||
useSSL = map['useSSL'] as bool;
|
||||
useSSL = map['useSSL'] as bool,
|
||||
trusted = map['trusted'] as bool ?? false;
|
||||
|
||||
static const typeId = 1;
|
||||
static const boxName = 'Nodes';
|
||||
|
@ -50,8 +52,13 @@ class Node extends HiveObject with Keyable {
|
|||
@HiveField(4)
|
||||
bool useSSL;
|
||||
|
||||
@HiveField(5)
|
||||
bool trusted;
|
||||
|
||||
bool get isSSL => useSSL ?? false;
|
||||
|
||||
bool get isTrusted => trusted ?? false;
|
||||
|
||||
Uri get uri {
|
||||
switch (type) {
|
||||
case WalletType.monero:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue