mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-25 11:45:59 +00:00
fix all own addresses query
This commit is contained in:
parent
575cce1a7d
commit
0a3c001845
7 changed files with 50 additions and 21 deletions
|
@ -1319,9 +1319,13 @@ class BitcoinWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
||||||
final allAddresses = await db
|
final allAddresses = await db
|
||||||
.getAddresses(walletId)
|
.getAddresses(walletId)
|
||||||
.filter()
|
.filter()
|
||||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
.not()
|
||||||
.or()
|
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||||
.subTypeEqualTo(isar_models.AddressSubType.change)
|
.and()
|
||||||
|
.group((q) => q
|
||||||
|
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||||
|
.or()
|
||||||
|
.subTypeEqualTo(isar_models.AddressSubType.change))
|
||||||
.findAll();
|
.findAll();
|
||||||
// final List<String> allAddresses = [];
|
// final List<String> allAddresses = [];
|
||||||
// final receivingAddresses = DB.instance.get<dynamic>(
|
// final receivingAddresses = DB.instance.get<dynamic>(
|
||||||
|
|
|
@ -1274,9 +1274,13 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
||||||
final allAddresses = await db
|
final allAddresses = await db
|
||||||
.getAddresses(walletId)
|
.getAddresses(walletId)
|
||||||
.filter()
|
.filter()
|
||||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
.not()
|
||||||
.or()
|
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||||
.subTypeEqualTo(isar_models.AddressSubType.change)
|
.and()
|
||||||
|
.group((q) => q
|
||||||
|
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||||
|
.or()
|
||||||
|
.subTypeEqualTo(isar_models.AddressSubType.change))
|
||||||
.findAll();
|
.findAll();
|
||||||
|
|
||||||
// for (var i = 0; i < receivingAddressesP2PKH.length; i++) {
|
// for (var i = 0; i < receivingAddressesP2PKH.length; i++) {
|
||||||
|
|
|
@ -1152,9 +1152,13 @@ class DogecoinWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
||||||
final allAddresses = await db
|
final allAddresses = await db
|
||||||
.getAddresses(walletId)
|
.getAddresses(walletId)
|
||||||
.filter()
|
.filter()
|
||||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
.not()
|
||||||
.or()
|
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||||
.subTypeEqualTo(isar_models.AddressSubType.change)
|
.and()
|
||||||
|
.group((q) => q
|
||||||
|
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||||
|
.or()
|
||||||
|
.subTypeEqualTo(isar_models.AddressSubType.change))
|
||||||
.findAll();
|
.findAll();
|
||||||
return allAddresses;
|
return allAddresses;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3232,9 +3232,13 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive {
|
||||||
final allAddresses = await db
|
final allAddresses = await db
|
||||||
.getAddresses(walletId)
|
.getAddresses(walletId)
|
||||||
.filter()
|
.filter()
|
||||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
.not()
|
||||||
.or()
|
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||||
.subTypeEqualTo(isar_models.AddressSubType.change)
|
.and()
|
||||||
|
.group((q) => q
|
||||||
|
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||||
|
.or()
|
||||||
|
.subTypeEqualTo(isar_models.AddressSubType.change))
|
||||||
.findAll();
|
.findAll();
|
||||||
// final List<String> allAddresses = [];
|
// final List<String> allAddresses = [];
|
||||||
// final receivingAddresses =
|
// final receivingAddresses =
|
||||||
|
|
|
@ -1335,9 +1335,13 @@ class LitecoinWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
||||||
final allAddresses = await db
|
final allAddresses = await db
|
||||||
.getAddresses(walletId)
|
.getAddresses(walletId)
|
||||||
.filter()
|
.filter()
|
||||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
.not()
|
||||||
.or()
|
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||||
.subTypeEqualTo(isar_models.AddressSubType.change)
|
.and()
|
||||||
|
.group((q) => q
|
||||||
|
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||||
|
.or()
|
||||||
|
.subTypeEqualTo(isar_models.AddressSubType.change))
|
||||||
.findAll();
|
.findAll();
|
||||||
// final List<String> allAddresses = [];
|
// final List<String> allAddresses = [];
|
||||||
// final receivingAddresses = DB.instance.get<dynamic>(
|
// final receivingAddresses = DB.instance.get<dynamic>(
|
||||||
|
|
|
@ -1324,9 +1324,13 @@ class NamecoinWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
||||||
final allAddresses = await db
|
final allAddresses = await db
|
||||||
.getAddresses(walletId)
|
.getAddresses(walletId)
|
||||||
.filter()
|
.filter()
|
||||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
.not()
|
||||||
.or()
|
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||||
.subTypeEqualTo(isar_models.AddressSubType.change)
|
.and()
|
||||||
|
.group((q) => q
|
||||||
|
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||||
|
.or()
|
||||||
|
.subTypeEqualTo(isar_models.AddressSubType.change))
|
||||||
.findAll();
|
.findAll();
|
||||||
// final List<String> allAddresses = [];
|
// final List<String> allAddresses = [];
|
||||||
// final receivingAddresses = DB.instance.get<dynamic>(
|
// final receivingAddresses = DB.instance.get<dynamic>(
|
||||||
|
|
|
@ -1255,10 +1255,15 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
||||||
final allAddresses = await db
|
final allAddresses = await db
|
||||||
.getAddresses(walletId)
|
.getAddresses(walletId)
|
||||||
.filter()
|
.filter()
|
||||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
.not()
|
||||||
.or()
|
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||||
.subTypeEqualTo(isar_models.AddressSubType.change)
|
.and()
|
||||||
|
.group((q) => q
|
||||||
|
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||||
|
.or()
|
||||||
|
.subTypeEqualTo(isar_models.AddressSubType.change))
|
||||||
.findAll();
|
.findAll();
|
||||||
|
|
||||||
// final List<String> allAddresses = [];
|
// final List<String> allAddresses = [];
|
||||||
// final receivingAddresses = DB.instance.get<dynamic>(
|
// final receivingAddresses = DB.instance.get<dynamic>(
|
||||||
// boxName: walletId, key: 'receivingAddressesP2WPKH') as List<dynamic>;
|
// boxName: walletId, key: 'receivingAddressesP2WPKH') as List<dynamic>;
|
||||||
|
|
Loading…
Reference in a new issue