mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-12 09:27:01 +00:00
update lelantus coin schema
This commit is contained in:
parent
df0b004b82
commit
c97de6017b
7 changed files with 634 additions and 203 deletions
|
@ -14,7 +14,6 @@ import 'package:isar/isar.dart';
|
|||
import 'package:stackwallet/exceptions/main_db/main_db_exception.dart';
|
||||
import 'package:stackwallet/models/isar/models/block_explorer.dart';
|
||||
import 'package:stackwallet/models/isar/models/contact_entry.dart';
|
||||
import 'package:stackwallet/models/isar/models/firo_specific/lelantus_coin.dart';
|
||||
import 'package:stackwallet/models/isar/models/isar_models.dart';
|
||||
import 'package:stackwallet/models/isar/stack_theme.dart';
|
||||
import 'package:stackwallet/utilities/amount/amount.dart';
|
||||
|
|
|
@ -23,20 +23,33 @@ class LelantusCoin {
|
|||
|
||||
final String value; // can't use BigInt in isar :shrug:
|
||||
|
||||
final int index;
|
||||
@Index(
|
||||
unique: true,
|
||||
replace: false,
|
||||
composite: [
|
||||
CompositeIndex("walletId"),
|
||||
],
|
||||
)
|
||||
final int mintIndex;
|
||||
|
||||
final int anonymitySetId;
|
||||
|
||||
final bool isUsed;
|
||||
|
||||
final bool isJMint;
|
||||
|
||||
final String? otherData;
|
||||
|
||||
LelantusCoin({
|
||||
required this.walletId,
|
||||
required this.publicCoin,
|
||||
required this.txid,
|
||||
required this.value,
|
||||
required this.index,
|
||||
required this.mintIndex,
|
||||
required this.anonymitySetId,
|
||||
required this.isUsed,
|
||||
required this.isJMint,
|
||||
required this.otherData,
|
||||
});
|
||||
|
||||
LelantusCoin copyWith({
|
||||
|
@ -44,18 +57,22 @@ class LelantusCoin {
|
|||
String? publicCoin,
|
||||
String? txid,
|
||||
String? value,
|
||||
int? index,
|
||||
int? mintIndex,
|
||||
int? anonymitySetId,
|
||||
bool? isUsed,
|
||||
bool? isJMint,
|
||||
String? otherData,
|
||||
}) {
|
||||
return LelantusCoin(
|
||||
walletId: walletId ?? this.walletId,
|
||||
publicCoin: publicCoin ?? this.publicCoin,
|
||||
txid: txid ?? this.txid,
|
||||
value: value ?? this.value,
|
||||
index: index ?? this.index,
|
||||
mintIndex: mintIndex ?? this.mintIndex,
|
||||
anonymitySetId: anonymitySetId ?? this.anonymitySetId,
|
||||
isUsed: isUsed ?? this.isUsed,
|
||||
isJMint: isJMint ?? this.isJMint,
|
||||
otherData: otherData ?? this.otherData,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -67,8 +84,10 @@ class LelantusCoin {
|
|||
'publicCoin: $publicCoin, '
|
||||
'txid: $txid, '
|
||||
'value: $value, '
|
||||
'index: $index, '
|
||||
'mintIndex: $mintIndex, '
|
||||
'anonymitySetId: $anonymitySetId, '
|
||||
'otherData: $otherData, '
|
||||
'isJMint: $isJMint, '
|
||||
'isUsed: $isUsed'
|
||||
'}';
|
||||
}
|
||||
|
|
|
@ -22,33 +22,43 @@ const LelantusCoinSchema = CollectionSchema(
|
|||
name: r'anonymitySetId',
|
||||
type: IsarType.long,
|
||||
),
|
||||
r'index': PropertySchema(
|
||||
r'isJMint': PropertySchema(
|
||||
id: 1,
|
||||
name: r'index',
|
||||
type: IsarType.long,
|
||||
name: r'isJMint',
|
||||
type: IsarType.bool,
|
||||
),
|
||||
r'isUsed': PropertySchema(
|
||||
id: 2,
|
||||
name: r'isUsed',
|
||||
type: IsarType.bool,
|
||||
),
|
||||
r'publicCoin': PropertySchema(
|
||||
r'mintIndex': PropertySchema(
|
||||
id: 3,
|
||||
name: r'mintIndex',
|
||||
type: IsarType.long,
|
||||
),
|
||||
r'otherData': PropertySchema(
|
||||
id: 4,
|
||||
name: r'otherData',
|
||||
type: IsarType.string,
|
||||
),
|
||||
r'publicCoin': PropertySchema(
|
||||
id: 5,
|
||||
name: r'publicCoin',
|
||||
type: IsarType.string,
|
||||
),
|
||||
r'txid': PropertySchema(
|
||||
id: 4,
|
||||
id: 6,
|
||||
name: r'txid',
|
||||
type: IsarType.string,
|
||||
),
|
||||
r'value': PropertySchema(
|
||||
id: 5,
|
||||
id: 7,
|
||||
name: r'value',
|
||||
type: IsarType.string,
|
||||
),
|
||||
r'walletId': PropertySchema(
|
||||
id: 6,
|
||||
id: 8,
|
||||
name: r'walletId',
|
||||
type: IsarType.string,
|
||||
)
|
||||
|
@ -94,6 +104,24 @@ const LelantusCoinSchema = CollectionSchema(
|
|||
caseSensitive: true,
|
||||
)
|
||||
],
|
||||
),
|
||||
r'mintIndex_walletId': IndexSchema(
|
||||
id: -9147309777276196770,
|
||||
name: r'mintIndex_walletId',
|
||||
unique: true,
|
||||
replace: false,
|
||||
properties: [
|
||||
IndexPropertySchema(
|
||||
name: r'mintIndex',
|
||||
type: IndexType.value,
|
||||
caseSensitive: false,
|
||||
),
|
||||
IndexPropertySchema(
|
||||
name: r'walletId',
|
||||
type: IndexType.hash,
|
||||
caseSensitive: true,
|
||||
)
|
||||
],
|
||||
)
|
||||
},
|
||||
links: {},
|
||||
|
@ -110,6 +138,12 @@ int _lelantusCoinEstimateSize(
|
|||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
var bytesCount = offsets.last;
|
||||
{
|
||||
final value = object.otherData;
|
||||
if (value != null) {
|
||||
bytesCount += 3 + value.length * 3;
|
||||
}
|
||||
}
|
||||
bytesCount += 3 + object.publicCoin.length * 3;
|
||||
bytesCount += 3 + object.txid.length * 3;
|
||||
bytesCount += 3 + object.value.length * 3;
|
||||
|
@ -124,12 +158,14 @@ void _lelantusCoinSerialize(
|
|||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
writer.writeLong(offsets[0], object.anonymitySetId);
|
||||
writer.writeLong(offsets[1], object.index);
|
||||
writer.writeBool(offsets[1], object.isJMint);
|
||||
writer.writeBool(offsets[2], object.isUsed);
|
||||
writer.writeString(offsets[3], object.publicCoin);
|
||||
writer.writeString(offsets[4], object.txid);
|
||||
writer.writeString(offsets[5], object.value);
|
||||
writer.writeString(offsets[6], object.walletId);
|
||||
writer.writeLong(offsets[3], object.mintIndex);
|
||||
writer.writeString(offsets[4], object.otherData);
|
||||
writer.writeString(offsets[5], object.publicCoin);
|
||||
writer.writeString(offsets[6], object.txid);
|
||||
writer.writeString(offsets[7], object.value);
|
||||
writer.writeString(offsets[8], object.walletId);
|
||||
}
|
||||
|
||||
LelantusCoin _lelantusCoinDeserialize(
|
||||
|
@ -140,12 +176,14 @@ LelantusCoin _lelantusCoinDeserialize(
|
|||
) {
|
||||
final object = LelantusCoin(
|
||||
anonymitySetId: reader.readLong(offsets[0]),
|
||||
index: reader.readLong(offsets[1]),
|
||||
isJMint: reader.readBool(offsets[1]),
|
||||
isUsed: reader.readBool(offsets[2]),
|
||||
publicCoin: reader.readString(offsets[3]),
|
||||
txid: reader.readString(offsets[4]),
|
||||
value: reader.readString(offsets[5]),
|
||||
walletId: reader.readString(offsets[6]),
|
||||
mintIndex: reader.readLong(offsets[3]),
|
||||
otherData: reader.readStringOrNull(offsets[4]),
|
||||
publicCoin: reader.readString(offsets[5]),
|
||||
txid: reader.readString(offsets[6]),
|
||||
value: reader.readString(offsets[7]),
|
||||
walletId: reader.readString(offsets[8]),
|
||||
);
|
||||
object.id = id;
|
||||
return object;
|
||||
|
@ -161,17 +199,21 @@ P _lelantusCoinDeserializeProp<P>(
|
|||
case 0:
|
||||
return (reader.readLong(offset)) as P;
|
||||
case 1:
|
||||
return (reader.readLong(offset)) as P;
|
||||
return (reader.readBool(offset)) as P;
|
||||
case 2:
|
||||
return (reader.readBool(offset)) as P;
|
||||
case 3:
|
||||
return (reader.readString(offset)) as P;
|
||||
return (reader.readLong(offset)) as P;
|
||||
case 4:
|
||||
return (reader.readString(offset)) as P;
|
||||
return (reader.readStringOrNull(offset)) as P;
|
||||
case 5:
|
||||
return (reader.readString(offset)) as P;
|
||||
case 6:
|
||||
return (reader.readString(offset)) as P;
|
||||
case 7:
|
||||
return (reader.readString(offset)) as P;
|
||||
case 8:
|
||||
return (reader.readString(offset)) as P;
|
||||
default:
|
||||
throw IsarError('Unknown property with id $propertyId');
|
||||
}
|
||||
|
@ -290,6 +332,92 @@ extension LelantusCoinByIndex on IsarCollection<LelantusCoin> {
|
|||
return putAllByIndexSync(r'publicCoin_walletId_txid', objects,
|
||||
saveLinks: saveLinks);
|
||||
}
|
||||
|
||||
Future<LelantusCoin?> getByMintIndexWalletId(int mintIndex, String walletId) {
|
||||
return getByIndex(r'mintIndex_walletId', [mintIndex, walletId]);
|
||||
}
|
||||
|
||||
LelantusCoin? getByMintIndexWalletIdSync(int mintIndex, String walletId) {
|
||||
return getByIndexSync(r'mintIndex_walletId', [mintIndex, walletId]);
|
||||
}
|
||||
|
||||
Future<bool> deleteByMintIndexWalletId(int mintIndex, String walletId) {
|
||||
return deleteByIndex(r'mintIndex_walletId', [mintIndex, walletId]);
|
||||
}
|
||||
|
||||
bool deleteByMintIndexWalletIdSync(int mintIndex, String walletId) {
|
||||
return deleteByIndexSync(r'mintIndex_walletId', [mintIndex, walletId]);
|
||||
}
|
||||
|
||||
Future<List<LelantusCoin?>> getAllByMintIndexWalletId(
|
||||
List<int> mintIndexValues, List<String> walletIdValues) {
|
||||
final len = mintIndexValues.length;
|
||||
assert(walletIdValues.length == len,
|
||||
'All index values must have the same length');
|
||||
final values = <List<dynamic>>[];
|
||||
for (var i = 0; i < len; i++) {
|
||||
values.add([mintIndexValues[i], walletIdValues[i]]);
|
||||
}
|
||||
|
||||
return getAllByIndex(r'mintIndex_walletId', values);
|
||||
}
|
||||
|
||||
List<LelantusCoin?> getAllByMintIndexWalletIdSync(
|
||||
List<int> mintIndexValues, List<String> walletIdValues) {
|
||||
final len = mintIndexValues.length;
|
||||
assert(walletIdValues.length == len,
|
||||
'All index values must have the same length');
|
||||
final values = <List<dynamic>>[];
|
||||
for (var i = 0; i < len; i++) {
|
||||
values.add([mintIndexValues[i], walletIdValues[i]]);
|
||||
}
|
||||
|
||||
return getAllByIndexSync(r'mintIndex_walletId', values);
|
||||
}
|
||||
|
||||
Future<int> deleteAllByMintIndexWalletId(
|
||||
List<int> mintIndexValues, List<String> walletIdValues) {
|
||||
final len = mintIndexValues.length;
|
||||
assert(walletIdValues.length == len,
|
||||
'All index values must have the same length');
|
||||
final values = <List<dynamic>>[];
|
||||
for (var i = 0; i < len; i++) {
|
||||
values.add([mintIndexValues[i], walletIdValues[i]]);
|
||||
}
|
||||
|
||||
return deleteAllByIndex(r'mintIndex_walletId', values);
|
||||
}
|
||||
|
||||
int deleteAllByMintIndexWalletIdSync(
|
||||
List<int> mintIndexValues, List<String> walletIdValues) {
|
||||
final len = mintIndexValues.length;
|
||||
assert(walletIdValues.length == len,
|
||||
'All index values must have the same length');
|
||||
final values = <List<dynamic>>[];
|
||||
for (var i = 0; i < len; i++) {
|
||||
values.add([mintIndexValues[i], walletIdValues[i]]);
|
||||
}
|
||||
|
||||
return deleteAllByIndexSync(r'mintIndex_walletId', values);
|
||||
}
|
||||
|
||||
Future<Id> putByMintIndexWalletId(LelantusCoin object) {
|
||||
return putByIndex(r'mintIndex_walletId', object);
|
||||
}
|
||||
|
||||
Id putByMintIndexWalletIdSync(LelantusCoin object, {bool saveLinks = true}) {
|
||||
return putByIndexSync(r'mintIndex_walletId', object, saveLinks: saveLinks);
|
||||
}
|
||||
|
||||
Future<List<Id>> putAllByMintIndexWalletId(List<LelantusCoin> objects) {
|
||||
return putAllByIndex(r'mintIndex_walletId', objects);
|
||||
}
|
||||
|
||||
List<Id> putAllByMintIndexWalletIdSync(List<LelantusCoin> objects,
|
||||
{bool saveLinks = true}) {
|
||||
return putAllByIndexSync(r'mintIndex_walletId', objects,
|
||||
saveLinks: saveLinks);
|
||||
}
|
||||
}
|
||||
|
||||
extension LelantusCoinQueryWhereSort
|
||||
|
@ -552,6 +680,144 @@ extension LelantusCoinQueryWhere
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterWhereClause>
|
||||
mintIndexEqualToAnyWalletId(int mintIndex) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(IndexWhereClause.equalTo(
|
||||
indexName: r'mintIndex_walletId',
|
||||
value: [mintIndex],
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterWhereClause>
|
||||
mintIndexNotEqualToAnyWalletId(int mintIndex) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
if (query.whereSort == Sort.asc) {
|
||||
return query
|
||||
.addWhereClause(IndexWhereClause.between(
|
||||
indexName: r'mintIndex_walletId',
|
||||
lower: [],
|
||||
upper: [mintIndex],
|
||||
includeUpper: false,
|
||||
))
|
||||
.addWhereClause(IndexWhereClause.between(
|
||||
indexName: r'mintIndex_walletId',
|
||||
lower: [mintIndex],
|
||||
includeLower: false,
|
||||
upper: [],
|
||||
));
|
||||
} else {
|
||||
return query
|
||||
.addWhereClause(IndexWhereClause.between(
|
||||
indexName: r'mintIndex_walletId',
|
||||
lower: [mintIndex],
|
||||
includeLower: false,
|
||||
upper: [],
|
||||
))
|
||||
.addWhereClause(IndexWhereClause.between(
|
||||
indexName: r'mintIndex_walletId',
|
||||
lower: [],
|
||||
upper: [mintIndex],
|
||||
includeUpper: false,
|
||||
));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterWhereClause>
|
||||
mintIndexGreaterThanAnyWalletId(
|
||||
int mintIndex, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(IndexWhereClause.between(
|
||||
indexName: r'mintIndex_walletId',
|
||||
lower: [mintIndex],
|
||||
includeLower: include,
|
||||
upper: [],
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterWhereClause>
|
||||
mintIndexLessThanAnyWalletId(
|
||||
int mintIndex, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(IndexWhereClause.between(
|
||||
indexName: r'mintIndex_walletId',
|
||||
lower: [],
|
||||
upper: [mintIndex],
|
||||
includeUpper: include,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterWhereClause>
|
||||
mintIndexBetweenAnyWalletId(
|
||||
int lowerMintIndex,
|
||||
int upperMintIndex, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(IndexWhereClause.between(
|
||||
indexName: r'mintIndex_walletId',
|
||||
lower: [lowerMintIndex],
|
||||
includeLower: includeLower,
|
||||
upper: [upperMintIndex],
|
||||
includeUpper: includeUpper,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterWhereClause>
|
||||
mintIndexWalletIdEqualTo(int mintIndex, String walletId) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(IndexWhereClause.equalTo(
|
||||
indexName: r'mintIndex_walletId',
|
||||
value: [mintIndex, walletId],
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterWhereClause>
|
||||
mintIndexEqualToWalletIdNotEqualTo(int mintIndex, String walletId) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
if (query.whereSort == Sort.asc) {
|
||||
return query
|
||||
.addWhereClause(IndexWhereClause.between(
|
||||
indexName: r'mintIndex_walletId',
|
||||
lower: [mintIndex],
|
||||
upper: [mintIndex, walletId],
|
||||
includeUpper: false,
|
||||
))
|
||||
.addWhereClause(IndexWhereClause.between(
|
||||
indexName: r'mintIndex_walletId',
|
||||
lower: [mintIndex, walletId],
|
||||
includeLower: false,
|
||||
upper: [mintIndex],
|
||||
));
|
||||
} else {
|
||||
return query
|
||||
.addWhereClause(IndexWhereClause.between(
|
||||
indexName: r'mintIndex_walletId',
|
||||
lower: [mintIndex, walletId],
|
||||
includeLower: false,
|
||||
upper: [mintIndex],
|
||||
))
|
||||
.addWhereClause(IndexWhereClause.between(
|
||||
indexName: r'mintIndex_walletId',
|
||||
lower: [mintIndex],
|
||||
upper: [mintIndex, walletId],
|
||||
includeUpper: false,
|
||||
));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension LelantusCoinQueryFilter
|
||||
|
@ -665,60 +931,16 @@ extension LelantusCoinQueryFilter
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition> indexEqualTo(
|
||||
int value) {
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
isJMintEqualTo(bool value) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'index',
|
||||
property: r'isJMint',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
indexGreaterThan(
|
||||
int value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
include: include,
|
||||
property: r'index',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition> indexLessThan(
|
||||
int value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.lessThan(
|
||||
include: include,
|
||||
property: r'index',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition> indexBetween(
|
||||
int lower,
|
||||
int upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.between(
|
||||
property: r'index',
|
||||
lower: lower,
|
||||
includeLower: includeLower,
|
||||
upper: upper,
|
||||
includeUpper: includeUpper,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition> isUsedEqualTo(
|
||||
bool value) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
|
@ -729,6 +951,216 @@ extension LelantusCoinQueryFilter
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
mintIndexEqualTo(int value) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'mintIndex',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
mintIndexGreaterThan(
|
||||
int value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
include: include,
|
||||
property: r'mintIndex',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
mintIndexLessThan(
|
||||
int value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.lessThan(
|
||||
include: include,
|
||||
property: r'mintIndex',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
mintIndexBetween(
|
||||
int lower,
|
||||
int upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.between(
|
||||
property: r'mintIndex',
|
||||
lower: lower,
|
||||
includeLower: includeLower,
|
||||
upper: upper,
|
||||
includeUpper: includeUpper,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
otherDataIsNull() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(const FilterCondition.isNull(
|
||||
property: r'otherData',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
otherDataIsNotNull() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(const FilterCondition.isNotNull(
|
||||
property: r'otherData',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
otherDataEqualTo(
|
||||
String? value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'otherData',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
otherDataGreaterThan(
|
||||
String? value, {
|
||||
bool include = false,
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
include: include,
|
||||
property: r'otherData',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
otherDataLessThan(
|
||||
String? value, {
|
||||
bool include = false,
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.lessThan(
|
||||
include: include,
|
||||
property: r'otherData',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
otherDataBetween(
|
||||
String? lower,
|
||||
String? upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.between(
|
||||
property: r'otherData',
|
||||
lower: lower,
|
||||
includeLower: includeLower,
|
||||
upper: upper,
|
||||
includeUpper: includeUpper,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
otherDataStartsWith(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.startsWith(
|
||||
property: r'otherData',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
otherDataEndsWith(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.endsWith(
|
||||
property: r'otherData',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
otherDataContains(String value, {bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.contains(
|
||||
property: r'otherData',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
otherDataMatches(String pattern, {bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.matches(
|
||||
property: r'otherData',
|
||||
wildcard: pattern,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
otherDataIsEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'otherData',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
otherDataIsNotEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
property: r'otherData',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterFilterCondition>
|
||||
publicCoinEqualTo(
|
||||
String value, {
|
||||
|
@ -1292,15 +1724,15 @@ extension LelantusCoinQuerySortBy
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> sortByIndex() {
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> sortByIsJMint() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'index', Sort.asc);
|
||||
return query.addSortBy(r'isJMint', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> sortByIndexDesc() {
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> sortByIsJMintDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'index', Sort.desc);
|
||||
return query.addSortBy(r'isJMint', Sort.desc);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1316,6 +1748,30 @@ extension LelantusCoinQuerySortBy
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> sortByMintIndex() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'mintIndex', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> sortByMintIndexDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'mintIndex', Sort.desc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> sortByOtherData() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'otherData', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> sortByOtherDataDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'otherData', Sort.desc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> sortByPublicCoin() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'publicCoin', Sort.asc);
|
||||
|
@ -1394,15 +1850,15 @@ extension LelantusCoinQuerySortThenBy
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> thenByIndex() {
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> thenByIsJMint() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'index', Sort.asc);
|
||||
return query.addSortBy(r'isJMint', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> thenByIndexDesc() {
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> thenByIsJMintDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'index', Sort.desc);
|
||||
return query.addSortBy(r'isJMint', Sort.desc);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1418,6 +1874,30 @@ extension LelantusCoinQuerySortThenBy
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> thenByMintIndex() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'mintIndex', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> thenByMintIndexDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'mintIndex', Sort.desc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> thenByOtherData() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'otherData', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> thenByOtherDataDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'otherData', Sort.desc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QAfterSortBy> thenByPublicCoin() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'publicCoin', Sort.asc);
|
||||
|
@ -1477,9 +1957,9 @@ extension LelantusCoinQueryWhereDistinct
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QDistinct> distinctByIndex() {
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QDistinct> distinctByIsJMint() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addDistinctBy(r'index');
|
||||
return query.addDistinctBy(r'isJMint');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1489,6 +1969,19 @@ extension LelantusCoinQueryWhereDistinct
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QDistinct> distinctByMintIndex() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addDistinctBy(r'mintIndex');
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QDistinct> distinctByOtherData(
|
||||
{bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addDistinctBy(r'otherData', caseSensitive: caseSensitive);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, LelantusCoin, QDistinct> distinctByPublicCoin(
|
||||
{bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
|
@ -1532,9 +2025,9 @@ extension LelantusCoinQueryProperty
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, int, QQueryOperations> indexProperty() {
|
||||
QueryBuilder<LelantusCoin, bool, QQueryOperations> isJMintProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addPropertyName(r'index');
|
||||
return query.addPropertyName(r'isJMint');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1544,6 +2037,18 @@ extension LelantusCoinQueryProperty
|
|||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, int, QQueryOperations> mintIndexProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addPropertyName(r'mintIndex');
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, String?, QQueryOperations> otherDataProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addPropertyName(r'otherData');
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<LelantusCoin, String, QQueryOperations> publicCoinProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addPropertyName(r'publicCoin');
|
||||
|
|
|
@ -269,18 +269,20 @@ Future<Map<String, dynamic>> isolateRestore(
|
|||
|
||||
lelantusCoins.removeWhere((e) =>
|
||||
e.txid == txId &&
|
||||
e.index == currentIndex &&
|
||||
e.mintIndex == currentIndex &&
|
||||
e.anonymitySetId != setId);
|
||||
|
||||
lelantusCoins.add(
|
||||
isar_models.LelantusCoin(
|
||||
walletId: walletId,
|
||||
index: currentIndex,
|
||||
mintIndex: currentIndex,
|
||||
value: amount.toString(),
|
||||
publicCoin: publicCoin,
|
||||
txid: txId,
|
||||
anonymitySetId: setId,
|
||||
isUsed: isUsed,
|
||||
isJMint: false,
|
||||
otherData: null,
|
||||
),
|
||||
);
|
||||
Logging.instance.log(
|
||||
|
@ -317,18 +319,20 @@ Future<Map<String, dynamic>> isolateRestore(
|
|||
bool isUsed = usedSerialNumbersSet.contains(serialNumber);
|
||||
lelantusCoins.removeWhere((e) =>
|
||||
e.txid == txId &&
|
||||
e.index == currentIndex &&
|
||||
e.mintIndex == currentIndex &&
|
||||
e.anonymitySetId != setId);
|
||||
|
||||
lelantusCoins.add(
|
||||
isar_models.LelantusCoin(
|
||||
walletId: walletId,
|
||||
index: currentIndex,
|
||||
mintIndex: currentIndex,
|
||||
value: amount.toString(),
|
||||
publicCoin: publicCoin,
|
||||
txid: txId,
|
||||
anonymitySetId: setId,
|
||||
isUsed: isUsed,
|
||||
isJMint: true,
|
||||
otherData: null,
|
||||
),
|
||||
);
|
||||
jindexes.add(currentIndex);
|
||||
|
@ -2325,7 +2329,7 @@ class FiroWallet extends CoinServiceAPI
|
|||
final derivePath = constructDerivePath(
|
||||
networkWIF: _network.wif,
|
||||
chain: MINT_INDEX,
|
||||
index: coin.index,
|
||||
index: coin.mintIndex,
|
||||
);
|
||||
final keyPair = await Bip32Utils.getBip32NodeFromRoot(root, derivePath);
|
||||
|
||||
|
@ -2335,7 +2339,7 @@ class FiroWallet extends CoinServiceAPI
|
|||
}
|
||||
final String privateKey = Format.uint8listToString(keyPair.privateKey!);
|
||||
return DartLelantusEntry(coin.isUsed ? 1 : 0, 0, coin.anonymitySetId,
|
||||
int.parse(coin.value), coin.index, privateKey);
|
||||
int.parse(coin.value), coin.mintIndex, privateKey);
|
||||
}).toList();
|
||||
|
||||
final lelantusEntries = await Future.wait(waitLelantusEntries);
|
||||
|
@ -3054,12 +3058,14 @@ class FiroWallet extends CoinServiceAPI
|
|||
// if a jmint was made add it to the unspent coin index
|
||||
final jmint = isar_models.LelantusCoin(
|
||||
walletId: walletId,
|
||||
index: index,
|
||||
mintIndex: nextFreeMintIndex,
|
||||
value: (transactionInfo['jmintValue'] as int? ?? 0).toString(),
|
||||
publicCoin: transactionInfo['publicCoin'] as String,
|
||||
txid: transactionInfo['txid'] as String,
|
||||
anonymitySetId: latestSetId,
|
||||
isUsed: false,
|
||||
isJMint: true,
|
||||
otherData: null,
|
||||
);
|
||||
if (int.parse(jmint.value) > 0) {
|
||||
updatedCoins.add(jmint);
|
||||
|
@ -3143,12 +3149,14 @@ class FiroWallet extends CoinServiceAPI
|
|||
final index = mintMap['index'] as int;
|
||||
final mint = isar_models.LelantusCoin(
|
||||
walletId: walletId,
|
||||
index: index,
|
||||
mintIndex: index,
|
||||
value: (mintMap['value'] as int).toString(),
|
||||
publicCoin: mintMap['publicCoin'] as String,
|
||||
txid: transactionInfo['txid'] as String,
|
||||
anonymitySetId: latestSetId,
|
||||
isUsed: false,
|
||||
isJMint: false,
|
||||
otherData: null,
|
||||
);
|
||||
if (int.parse(mint.value) > 0) {
|
||||
updatedCoins.add(mint);
|
||||
|
|
|
@ -386,19 +386,28 @@ class DbVersionMigrator with WalletDB {
|
|||
) as List? ??
|
||||
[];
|
||||
|
||||
final jindexes = (DB.instance
|
||||
.get<dynamic>(boxName: walletId, key: "jindex") as List? ??
|
||||
[])
|
||||
.cast<int>();
|
||||
|
||||
final List<isar_models.LelantusCoin> coins = [];
|
||||
for (final e in hiveLCoins) {
|
||||
final map = e as Map;
|
||||
final lcoin = map.values.first as LelantusCoin;
|
||||
|
||||
final isJMint = jindexes.contains(lcoin.index);
|
||||
|
||||
final coin = isar_models.LelantusCoin(
|
||||
walletId: walletId,
|
||||
publicCoin: lcoin.publicCoin,
|
||||
txid: lcoin.txId,
|
||||
value: lcoin.value.toString(),
|
||||
index: lcoin.index,
|
||||
mintIndex: lcoin.index,
|
||||
anonymitySetId: lcoin.anonymitySetId,
|
||||
isUsed: lcoin.isUsed,
|
||||
isJMint: isJMint,
|
||||
otherData: null,
|
||||
);
|
||||
|
||||
coins.add(coin);
|
||||
|
|
|
@ -14,7 +14,6 @@ import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i5;
|
|||
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i4;
|
||||
import 'package:stackwallet/models/balance.dart' as _i6;
|
||||
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i13;
|
||||
import 'package:stackwallet/models/lelantus_coin.dart' as _i15;
|
||||
import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i3;
|
||||
import 'package:stackwallet/models/signing_data.dart' as _i14;
|
||||
import 'package:stackwallet/services/coins/firo/firo_wallet.dart' as _i10;
|
||||
|
@ -589,15 +588,6 @@ class MockFiroWallet extends _i1.Mock implements _i10.FiroWallet {
|
|||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
@override
|
||||
List<Map<dynamic, _i15.LelantusCoin>> getLelantusCoinMap() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getLelantusCoinMap,
|
||||
[],
|
||||
),
|
||||
returnValue: <Map<dynamic, _i15.LelantusCoin>>[],
|
||||
) as List<Map<dynamic, _i15.LelantusCoin>>);
|
||||
@override
|
||||
_i11.Future<void> anonymizeAllPublicFunds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#anonymizeAllPublicFunds,
|
||||
|
@ -1061,51 +1051,6 @@ class MockFiroWallet extends _i1.Mock implements _i10.FiroWallet {
|
|||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void initFiroHive(String? walletId) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initFiroHive,
|
||||
[walletId],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
_i11.Future<void> firoUpdateJIndex(List<dynamic>? jIndex) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#firoUpdateJIndex,
|
||||
[jIndex],
|
||||
),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
@override
|
||||
_i11.Future<void> firoUpdateLelantusCoins(List<dynamic>? lelantusCoins) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#firoUpdateLelantusCoins,
|
||||
[lelantusCoins],
|
||||
),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
@override
|
||||
int firoGetMintIndex() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#firoGetMintIndex,
|
||||
[],
|
||||
),
|
||||
returnValue: 0,
|
||||
) as int);
|
||||
@override
|
||||
_i11.Future<void> firoUpdateMintIndex(int? mintIndex) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#firoUpdateMintIndex,
|
||||
[mintIndex],
|
||||
),
|
||||
returnValue: _i11.Future<void>.value(),
|
||||
returnValueForMissingStub: _i11.Future<void>.value(),
|
||||
) as _i11.Future<void>);
|
||||
}
|
||||
|
||||
/// A class which mocks [ElectrumX].
|
||||
|
|
|
@ -1602,15 +1602,6 @@ class MockFiroWallet extends _i1.Mock implements _i23.FiroWallet {
|
|||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
) as _i19.Future<void>);
|
||||
@override
|
||||
List<Map<dynamic, _i8.LelantusCoin>> getLelantusCoinMap() =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getLelantusCoinMap,
|
||||
[],
|
||||
),
|
||||
returnValue: <Map<dynamic, _i8.LelantusCoin>>[],
|
||||
) as List<Map<dynamic, _i8.LelantusCoin>>);
|
||||
@override
|
||||
_i19.Future<void> anonymizeAllPublicFunds() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#anonymizeAllPublicFunds,
|
||||
|
@ -2075,51 +2066,6 @@ class MockFiroWallet extends _i1.Mock implements _i23.FiroWallet {
|
|||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
void initFiroHive(String? walletId) => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#initFiroHive,
|
||||
[walletId],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
_i19.Future<void> firoUpdateJIndex(List<dynamic>? jIndex) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#firoUpdateJIndex,
|
||||
[jIndex],
|
||||
),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
) as _i19.Future<void>);
|
||||
@override
|
||||
_i19.Future<void> firoUpdateLelantusCoins(List<dynamic>? lelantusCoins) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#firoUpdateLelantusCoins,
|
||||
[lelantusCoins],
|
||||
),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
) as _i19.Future<void>);
|
||||
@override
|
||||
int firoGetMintIndex() => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#firoGetMintIndex,
|
||||
[],
|
||||
),
|
||||
returnValue: 0,
|
||||
) as int);
|
||||
@override
|
||||
_i19.Future<void> firoUpdateMintIndex(int? mintIndex) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#firoUpdateMintIndex,
|
||||
[mintIndex],
|
||||
),
|
||||
returnValue: _i19.Future<void>.value(),
|
||||
returnValueForMissingStub: _i19.Future<void>.value(),
|
||||
) as _i19.Future<void>);
|
||||
}
|
||||
|
||||
/// A class which mocks [LocaleService].
|
||||
|
|
Loading…
Reference in a new issue