get addresses => this.collection();
@@ -59,6 +59,11 @@ const AddressSchema = CollectionSchema(
id: 7,
name: r'walletId',
type: IsarType.string,
+ ),
+ r'zSafeFrost': PropertySchema(
+ id: 8,
+ name: r'zSafeFrost',
+ type: IsarType.bool,
)
},
estimateSize: _addressEstimateSize,
@@ -124,7 +129,7 @@ const AddressSchema = CollectionSchema(
getId: _addressGetId,
getLinks: _addressGetLinks,
attach: _addressAttach,
- version: '3.0.5',
+ version: '3.1.8',
);
int _addressEstimateSize(
@@ -172,6 +177,7 @@ void _addressSerialize(
writer.writeByte(offsets[5], object.type.index);
writer.writeString(offsets[6], object.value);
writer.writeString(offsets[7], object.walletId);
+ writer.writeBool(offsets[8], object.zSafeFrost);
}
Address _addressDeserialize(
@@ -195,6 +201,7 @@ Address _addressDeserialize(
AddressType.p2pkh,
value: reader.readString(offsets[6]),
walletId: reader.readString(offsets[7]),
+ zSafeFrost: reader.readBoolOrNull(offsets[8]),
);
object.id = id;
return object;
@@ -229,6 +236,8 @@ P _addressDeserializeProp(
return (reader.readString(offset)) as P;
case 7:
return (reader.readString(offset)) as P;
+ case 8:
+ return (reader.readBoolOrNull(offset)) as P;
default:
throw IsarError('Unknown property with id $propertyId');
}
@@ -1474,6 +1483,32 @@ extension AddressQueryFilter
));
});
}
+
+ QueryBuilder
zSafeFrostIsNull() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(const FilterCondition.isNull(
+ property: r'zSafeFrost',
+ ));
+ });
+ }
+
+ QueryBuilder zSafeFrostIsNotNull() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(const FilterCondition.isNotNull(
+ property: r'zSafeFrost',
+ ));
+ });
+ }
+
+ QueryBuilder zSafeFrostEqualTo(
+ bool? value) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'zSafeFrost',
+ value: value,
+ ));
+ });
+ }
}
extension AddressQueryObject
@@ -1621,6 +1656,18 @@ extension AddressQuerySortBy on QueryBuilder {
return query.addSortBy(r'walletId', Sort.desc);
});
}
+
+ QueryBuilder sortByZSafeFrost() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'zSafeFrost', Sort.asc);
+ });
+ }
+
+ QueryBuilder sortByZSafeFrostDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'zSafeFrost', Sort.desc);
+ });
+ }
}
extension AddressQuerySortThenBy
@@ -1708,6 +1755,18 @@ extension AddressQuerySortThenBy
return query.addSortBy(r'walletId', Sort.desc);
});
}
+
+ QueryBuilder thenByZSafeFrost() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'zSafeFrost', Sort.asc);
+ });
+ }
+
+ QueryBuilder thenByZSafeFrostDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'zSafeFrost', Sort.desc);
+ });
+ }
}
extension AddressQueryWhereDistinct
@@ -1756,6 +1815,12 @@ extension AddressQueryWhereDistinct
return query.addDistinctBy(r'walletId', caseSensitive: caseSensitive);
});
}
+
+ QueryBuilder distinctByZSafeFrost() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addDistinctBy(r'zSafeFrost');
+ });
+ }
}
extension AddressQueryProperty
@@ -1814,6 +1879,12 @@ extension AddressQueryProperty
return query.addPropertyName(r'walletId');
});
}
+
+ QueryBuilder zSafeFrostProperty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addPropertyName(r'zSafeFrost');
+ });
+ }
}
// **************************************************************************
@@ -1821,7 +1892,7 @@ extension AddressQueryProperty
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
const DerivationPathSchema = Schema(
name: r'DerivationPath',
diff --git a/lib/models/isar/models/blockchain_data/input.g.dart b/lib/models/isar/models/blockchain_data/input.g.dart
index 608446fea..a08dc7637 100644
--- a/lib/models/isar/models/blockchain_data/input.g.dart
+++ b/lib/models/isar/models/blockchain_data/input.g.dart
@@ -7,7 +7,7 @@ part of 'input.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
const InputSchema = Schema(
name: r'Input',
diff --git a/lib/models/isar/models/blockchain_data/output.g.dart b/lib/models/isar/models/blockchain_data/output.g.dart
index 5e3bbf02d..6a5812373 100644
--- a/lib/models/isar/models/blockchain_data/output.g.dart
+++ b/lib/models/isar/models/blockchain_data/output.g.dart
@@ -7,7 +7,7 @@ part of 'output.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
const OutputSchema = Schema(
name: r'Output',
diff --git a/lib/models/isar/models/blockchain_data/transaction.g.dart b/lib/models/isar/models/blockchain_data/transaction.g.dart
index 965a64870..0d34d133d 100644
--- a/lib/models/isar/models/blockchain_data/transaction.g.dart
+++ b/lib/models/isar/models/blockchain_data/transaction.g.dart
@@ -7,7 +7,7 @@ part of 'transaction.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
extension GetTransactionCollection on Isar {
IsarCollection get transactions => this.collection();
@@ -171,7 +171,7 @@ const TransactionSchema = CollectionSchema(
getId: _transactionGetId,
getLinks: _transactionGetLinks,
attach: _transactionAttach,
- version: '3.0.5',
+ version: '3.1.8',
);
int _transactionEstimateSize(
diff --git a/lib/models/isar/models/blockchain_data/utxo.dart b/lib/models/isar/models/blockchain_data/utxo.dart
index 7bbf50896..dd492d9b8 100644
--- a/lib/models/isar/models/blockchain_data/utxo.dart
+++ b/lib/models/isar/models/blockchain_data/utxo.dart
@@ -8,6 +8,7 @@
*
*/
+import 'dart:convert';
import 'dart:math';
import 'package:isar/isar.dart';
@@ -84,6 +85,20 @@ class UTXO {
return confirmations >= minimumConfirms;
}
+ @ignore
+ String? get keyImage {
+ if (otherData == null) {
+ return null;
+ }
+
+ try {
+ final map = jsonDecode(otherData!) as Map;
+ return map["keyImage"] as String;
+ } catch (_) {
+ return null;
+ }
+ }
+
UTXO copyWith({
Id? id,
String? walletId,
diff --git a/lib/models/isar/models/blockchain_data/utxo.g.dart b/lib/models/isar/models/blockchain_data/utxo.g.dart
index b12e9b470..0d2a0fcd7 100644
--- a/lib/models/isar/models/blockchain_data/utxo.g.dart
+++ b/lib/models/isar/models/blockchain_data/utxo.g.dart
@@ -7,7 +7,7 @@ part of 'utxo.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
extension GetUTXOCollection on Isar {
IsarCollection get utxos => this.collection();
@@ -149,7 +149,7 @@ const UTXOSchema = CollectionSchema(
getId: _uTXOGetId,
getLinks: _uTXOGetLinks,
attach: _uTXOAttach,
- version: '3.0.5',
+ version: '3.1.8',
);
int _uTXOEstimateSize(
diff --git a/lib/models/isar/models/blockchain_data/v2/input_v2.g.dart b/lib/models/isar/models/blockchain_data/v2/input_v2.g.dart
index c1a3b781b..fb0e9dd61 100644
--- a/lib/models/isar/models/blockchain_data/v2/input_v2.g.dart
+++ b/lib/models/isar/models/blockchain_data/v2/input_v2.g.dart
@@ -7,7 +7,7 @@ part of 'input_v2.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
const OutpointV2Schema = Schema(
name: r'OutpointV2',
@@ -330,7 +330,7 @@ extension OutpointV2QueryObject
on QueryBuilder {}
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
const InputV2Schema = Schema(
name: r'InputV2',
diff --git a/lib/models/isar/models/blockchain_data/v2/output_v2.g.dart b/lib/models/isar/models/blockchain_data/v2/output_v2.g.dart
index e26075d44..539ad6dbd 100644
--- a/lib/models/isar/models/blockchain_data/v2/output_v2.g.dart
+++ b/lib/models/isar/models/blockchain_data/v2/output_v2.g.dart
@@ -7,7 +7,7 @@ part of 'output_v2.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
const OutputV2Schema = Schema(
name: r'OutputV2',
diff --git a/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart b/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart
index 465dd3b13..4582ef47d 100644
--- a/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart
+++ b/lib/models/isar/models/blockchain_data/v2/transaction_v2.dart
@@ -134,6 +134,14 @@ class TransactionV2 {
}
Amount getAmountReceivedInThisWallet({required int fractionDigits}) {
+ if (_isMonero()) {
+ if (type == TransactionType.incoming) {
+ return _getMoneroAmount()!;
+ } else {
+ return Amount.zeroWith(fractionDigits: fractionDigits);
+ }
+ }
+
final outSum = outputs
.where((e) => e.walletOwns)
.fold(BigInt.zero, (p, e) => p + e.value);
@@ -151,6 +159,14 @@ class TransactionV2 {
}
Amount getAmountSentFromThisWallet({required int fractionDigits}) {
+ if (_isMonero()) {
+ if (type == TransactionType.outgoing) {
+ return _getMoneroAmount()!;
+ } else {
+ return Amount.zeroWith(fractionDigits: fractionDigits);
+ }
+ }
+
final inSum = inputs
.where((e) => e.walletOwns)
.fold(BigInt.zero, (p, e) => p + e.value);
@@ -191,6 +207,21 @@ class TransactionV2 {
}
}
+ Amount? _getMoneroAmount() {
+ try {
+ return Amount.fromSerializedJsonString(
+ _getFromOtherData(key: TxV2OdKeys.moneroAmount) as String,
+ );
+ } catch (_) {
+ return null;
+ }
+ }
+
+ bool _isMonero() {
+ final value = _getFromOtherData(key: TxV2OdKeys.isMoneroTransaction);
+ return value is bool ? value : false;
+ }
+
String statusLabel({
required int currentChainHeight,
required int minConfirms,
@@ -307,4 +338,7 @@ abstract final class TxV2OdKeys {
static const contractAddress = "contractAddress";
static const nonce = "nonce";
static const overrideFee = "overrideFee";
+ static const moneroAmount = "moneroAmount";
+ static const moneroAccountIndex = "moneroAccountIndex";
+ static const isMoneroTransaction = "isMoneroTransaction";
}
diff --git a/lib/models/isar/models/blockchain_data/v2/transaction_v2.g.dart b/lib/models/isar/models/blockchain_data/v2/transaction_v2.g.dart
index 83006da89..68d8a18c5 100644
--- a/lib/models/isar/models/blockchain_data/v2/transaction_v2.g.dart
+++ b/lib/models/isar/models/blockchain_data/v2/transaction_v2.g.dart
@@ -7,7 +7,7 @@ part of 'transaction_v2.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
extension GetTransactionV2Collection on Isar {
IsarCollection get transactionV2s => this.collection();
@@ -177,7 +177,7 @@ const TransactionV2Schema = CollectionSchema(
getId: _transactionV2GetId,
getLinks: _transactionV2GetLinks,
attach: _transactionV2Attach,
- version: '3.0.5',
+ version: '3.1.8',
);
int _transactionV2EstimateSize(
diff --git a/lib/models/isar/models/contact_entry.g.dart b/lib/models/isar/models/contact_entry.g.dart
index dc1eb2b61..282112f55 100644
--- a/lib/models/isar/models/contact_entry.g.dart
+++ b/lib/models/isar/models/contact_entry.g.dart
@@ -7,7 +7,7 @@ part of 'contact_entry.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
extension GetContactEntryCollection on Isar {
IsarCollection get contactEntrys => this.collection();
@@ -69,7 +69,7 @@ const ContactEntrySchema = CollectionSchema(
getId: _contactEntryGetId,
getLinks: _contactEntryGetLinks,
attach: _contactEntryAttach,
- version: '3.0.5',
+ version: '3.1.8',
);
int _contactEntryEstimateSize(
@@ -1142,7 +1142,7 @@ extension ContactEntryQueryProperty
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
const ContactAddressEntrySchema = Schema(
name: r'ContactAddressEntry',
diff --git a/lib/models/isar/models/encrypted_string_value.g.dart b/lib/models/isar/models/encrypted_string_value.g.dart
index fdfe5527a..5b3490dcc 100644
--- a/lib/models/isar/models/encrypted_string_value.g.dart
+++ b/lib/models/isar/models/encrypted_string_value.g.dart
@@ -7,7 +7,7 @@ part of 'encrypted_string_value.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
extension GetEncryptedStringValueCollection on Isar {
IsarCollection get encryptedStringValues =>
@@ -54,7 +54,7 @@ const EncryptedStringValueSchema = CollectionSchema(
getId: _encryptedStringValueGetId,
getLinks: _encryptedStringValueGetLinks,
attach: _encryptedStringValueAttach,
- version: '3.0.5',
+ version: '3.1.8',
);
int _encryptedStringValueEstimateSize(
diff --git a/lib/models/isar/models/ethereum/eth_contract.g.dart b/lib/models/isar/models/ethereum/eth_contract.g.dart
index bc9548e8d..fcb1af11d 100644
--- a/lib/models/isar/models/ethereum/eth_contract.g.dart
+++ b/lib/models/isar/models/ethereum/eth_contract.g.dart
@@ -7,7 +7,7 @@ part of 'eth_contract.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
extension GetEthContractCollection on Isar {
IsarCollection get ethContracts => this.collection();
@@ -74,7 +74,7 @@ const EthContractSchema = CollectionSchema(
getId: _ethContractGetId,
getLinks: _ethContractGetLinks,
attach: _ethContractAttach,
- version: '3.0.5',
+ version: '3.1.8',
);
int _ethContractEstimateSize(
diff --git a/lib/models/isar/models/firo_specific/lelantus_coin.g.dart b/lib/models/isar/models/firo_specific/lelantus_coin.g.dart
index 4b9214889..1c0f4d405 100644
--- a/lib/models/isar/models/firo_specific/lelantus_coin.g.dart
+++ b/lib/models/isar/models/firo_specific/lelantus_coin.g.dart
@@ -7,7 +7,7 @@ part of 'lelantus_coin.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
extension GetLelantusCoinCollection on Isar {
IsarCollection get lelantusCoins => this.collection();
@@ -101,7 +101,7 @@ const LelantusCoinSchema = CollectionSchema(
getId: _lelantusCoinGetId,
getLinks: _lelantusCoinGetLinks,
attach: _lelantusCoinAttach,
- version: '3.0.5',
+ version: '3.1.8',
);
int _lelantusCoinEstimateSize(
diff --git a/lib/models/isar/models/log.g.dart b/lib/models/isar/models/log.g.dart
index 8a4cf22b1..ebad873f2 100644
--- a/lib/models/isar/models/log.g.dart
+++ b/lib/models/isar/models/log.g.dart
@@ -7,7 +7,7 @@ part of 'log.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
extension GetLogCollection on Isar {
IsarCollection get logs => this.collection();
@@ -59,7 +59,7 @@ const LogSchema = CollectionSchema(
getId: _logGetId,
getLinks: _logGetLinks,
attach: _logAttach,
- version: '3.0.5',
+ version: '3.1.8',
);
int _logEstimateSize(
diff --git a/lib/models/isar/models/sent_to_address.g.dart b/lib/models/isar/models/sent_to_address.g.dart
index 304d2c5fc..88153da9d 100644
--- a/lib/models/isar/models/sent_to_address.g.dart
+++ b/lib/models/isar/models/sent_to_address.g.dart
@@ -7,7 +7,7 @@ part of 'sent_to_address.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
extension GetSentToAddressCollection on Isar {
IsarCollection get sentToAddress => this.collection();
@@ -81,7 +81,7 @@ const SentToAddressSchema = CollectionSchema(
getId: _sentToAddressGetId,
getLinks: _sentToAddressGetLinks,
attach: _sentToAddressAttach,
- version: '3.0.5',
+ version: '3.1.8',
);
int _sentToAddressEstimateSize(
diff --git a/lib/models/isar/models/transaction_note.g.dart b/lib/models/isar/models/transaction_note.g.dart
index 152070328..67af8cdca 100644
--- a/lib/models/isar/models/transaction_note.g.dart
+++ b/lib/models/isar/models/transaction_note.g.dart
@@ -7,7 +7,7 @@ part of 'transaction_note.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
extension GetTransactionNoteCollection on Isar {
IsarCollection get transactionNotes => this.collection();
@@ -76,7 +76,7 @@ const TransactionNoteSchema = CollectionSchema(
getId: _transactionNoteGetId,
getLinks: _transactionNoteGetLinks,
attach: _transactionNoteAttach,
- version: '3.0.5',
+ version: '3.1.8',
);
int _transactionNoteEstimateSize(
diff --git a/lib/models/isar/ordinal.g.dart b/lib/models/isar/ordinal.g.dart
index 89c967cb0..5c23e11bb 100644
--- a/lib/models/isar/ordinal.g.dart
+++ b/lib/models/isar/ordinal.g.dart
@@ -7,7 +7,7 @@ part of 'ordinal.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
extension GetOrdinalCollection on Isar {
IsarCollection get ordinals => this.collection();
@@ -83,7 +83,7 @@ const OrdinalSchema = CollectionSchema(
getId: _ordinalGetId,
getLinks: _ordinalGetLinks,
attach: _ordinalAttach,
- version: '3.0.5',
+ version: '3.1.8',
);
int _ordinalEstimateSize(
diff --git a/lib/models/isar/stack_theme.g.dart b/lib/models/isar/stack_theme.g.dart
index 03c543ff0..c77d979f5 100644
--- a/lib/models/isar/stack_theme.g.dart
+++ b/lib/models/isar/stack_theme.g.dart
@@ -7,7 +7,7 @@ part of 'stack_theme.dart';
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
extension GetStackThemeCollection on Isar {
IsarCollection get stackThemes => this.collection();
@@ -860,7 +860,7 @@ const StackThemeSchema = CollectionSchema(
getId: _stackThemeGetId,
getLinks: _stackThemeGetLinks,
attach: _stackThemeAttach,
- version: '3.0.5',
+ version: '3.1.8',
);
int _stackThemeEstimateSize(
@@ -18012,7 +18012,7 @@ extension StackThemeQueryProperty
// **************************************************************************
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
const ThemeAssetsSchema = Schema(
name: r'ThemeAssets',
@@ -25833,7 +25833,7 @@ extension ThemeAssetsQueryObject
on QueryBuilder {}
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
const ThemeAssetsV2Schema = Schema(
name: r'ThemeAssetsV2',
@@ -29441,7 +29441,7 @@ extension ThemeAssetsV2QueryObject
on QueryBuilder {}
// coverage:ignore-file
-// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters
+// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
const ThemeAssetsV3Schema = Schema(
name: r'ThemeAssetsV3',
diff --git a/lib/models/keys/view_only_wallet_data.dart b/lib/models/keys/view_only_wallet_data.dart
new file mode 100644
index 000000000..92c23b082
--- /dev/null
+++ b/lib/models/keys/view_only_wallet_data.dart
@@ -0,0 +1,164 @@
+import 'dart:convert';
+
+import '../../wallets/wallet/wallet_mixin_interfaces/extended_keys_interface.dart';
+import 'key_data_interface.dart';
+
+// do not remove or change the order of these enum values
+enum ViewOnlyWalletType {
+ cryptonote,
+ addressOnly,
+ xPub;
+}
+
+sealed class ViewOnlyWalletData with KeyDataInterface {
+ @override
+ final String walletId;
+
+ ViewOnlyWalletType get type;
+
+ ViewOnlyWalletData({
+ required this.walletId,
+ });
+
+ static ViewOnlyWalletData fromJsonEncodedString(
+ String jsonEncodedString, {
+ required String walletId,
+ }) {
+ final map = jsonDecode(jsonEncodedString) as Map;
+ final json = Map.from(map);
+ final type = ViewOnlyWalletType.values[json["type"] as int];
+
+ switch (type) {
+ case ViewOnlyWalletType.cryptonote:
+ return CryptonoteViewOnlyWalletData.fromJsonEncodedString(
+ jsonEncodedString,
+ walletId: walletId,
+ );
+
+ case ViewOnlyWalletType.addressOnly:
+ return AddressViewOnlyWalletData.fromJsonEncodedString(
+ jsonEncodedString,
+ walletId: walletId,
+ );
+
+ case ViewOnlyWalletType.xPub:
+ return ExtendedKeysViewOnlyWalletData.fromJsonEncodedString(
+ jsonEncodedString,
+ walletId: walletId,
+ );
+ }
+ }
+
+ String toJsonEncodedString();
+}
+
+class CryptonoteViewOnlyWalletData extends ViewOnlyWalletData {
+ @override
+ final type = ViewOnlyWalletType.cryptonote;
+
+ final String address;
+ final String privateViewKey;
+
+ CryptonoteViewOnlyWalletData({
+ required super.walletId,
+ required this.address,
+ required this.privateViewKey,
+ });
+
+ static CryptonoteViewOnlyWalletData fromJsonEncodedString(
+ String jsonEncodedString, {
+ required String walletId,
+ }) {
+ final map = jsonDecode(jsonEncodedString) as Map;
+ final json = Map.from(map);
+
+ return CryptonoteViewOnlyWalletData(
+ walletId: walletId,
+ address: json["address"] as String,
+ privateViewKey: json["privateViewKey"] as String,
+ );
+ }
+
+ @override
+ String toJsonEncodedString() => jsonEncode({
+ "type": type.index,
+ "address": address,
+ "privateViewKey": privateViewKey,
+ });
+}
+
+class AddressViewOnlyWalletData extends ViewOnlyWalletData {
+ @override
+ final type = ViewOnlyWalletType.addressOnly;
+
+ final String address;
+
+ AddressViewOnlyWalletData({
+ required super.walletId,
+ required this.address,
+ });
+
+ static AddressViewOnlyWalletData fromJsonEncodedString(
+ String jsonEncodedString, {
+ required String walletId,
+ }) {
+ final map = jsonDecode(jsonEncodedString) as Map;
+ final json = Map.from(map);
+
+ return AddressViewOnlyWalletData(
+ walletId: walletId,
+ address: json["address"] as String,
+ );
+ }
+
+ @override
+ String toJsonEncodedString() => jsonEncode({
+ "type": type.index,
+ "address": address,
+ });
+}
+
+class ExtendedKeysViewOnlyWalletData extends ViewOnlyWalletData {
+ @override
+ final type = ViewOnlyWalletType.xPub;
+
+ final List xPubs;
+
+ ExtendedKeysViewOnlyWalletData({
+ required super.walletId,
+ required List xPubs,
+ }) : xPubs = List.unmodifiable(xPubs);
+
+ static ExtendedKeysViewOnlyWalletData fromJsonEncodedString(
+ String jsonEncodedString, {
+ required String walletId,
+ }) {
+ final map = jsonDecode(jsonEncodedString) as Map;
+ final json = Map.from(map);
+
+ return ExtendedKeysViewOnlyWalletData(
+ walletId: walletId,
+ xPubs: List