mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 12:44:31 +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
|
||||
.getAddresses(walletId)
|
||||
.filter()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||
.or()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.change)
|
||||
.not()
|
||||
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||
.and()
|
||||
.group((q) => q
|
||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||
.or()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.change))
|
||||
.findAll();
|
||||
// final List<String> allAddresses = [];
|
||||
// final receivingAddresses = DB.instance.get<dynamic>(
|
||||
|
|
|
@ -1274,9 +1274,13 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
final allAddresses = await db
|
||||
.getAddresses(walletId)
|
||||
.filter()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||
.or()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.change)
|
||||
.not()
|
||||
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||
.and()
|
||||
.group((q) => q
|
||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||
.or()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.change))
|
||||
.findAll();
|
||||
|
||||
// for (var i = 0; i < receivingAddressesP2PKH.length; i++) {
|
||||
|
|
|
@ -1152,9 +1152,13 @@ class DogecoinWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
final allAddresses = await db
|
||||
.getAddresses(walletId)
|
||||
.filter()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||
.or()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.change)
|
||||
.not()
|
||||
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||
.and()
|
||||
.group((q) => q
|
||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||
.or()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.change))
|
||||
.findAll();
|
||||
return allAddresses;
|
||||
}
|
||||
|
|
|
@ -3232,9 +3232,13 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive {
|
|||
final allAddresses = await db
|
||||
.getAddresses(walletId)
|
||||
.filter()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||
.or()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.change)
|
||||
.not()
|
||||
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||
.and()
|
||||
.group((q) => q
|
||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||
.or()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.change))
|
||||
.findAll();
|
||||
// final List<String> allAddresses = [];
|
||||
// final receivingAddresses =
|
||||
|
|
|
@ -1335,9 +1335,13 @@ class LitecoinWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
final allAddresses = await db
|
||||
.getAddresses(walletId)
|
||||
.filter()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||
.or()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.change)
|
||||
.not()
|
||||
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||
.and()
|
||||
.group((q) => q
|
||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||
.or()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.change))
|
||||
.findAll();
|
||||
// final List<String> allAddresses = [];
|
||||
// final receivingAddresses = DB.instance.get<dynamic>(
|
||||
|
|
|
@ -1324,9 +1324,13 @@ class NamecoinWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
final allAddresses = await db
|
||||
.getAddresses(walletId)
|
||||
.filter()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||
.or()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.change)
|
||||
.not()
|
||||
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||
.and()
|
||||
.group((q) => q
|
||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||
.or()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.change))
|
||||
.findAll();
|
||||
// final List<String> allAddresses = [];
|
||||
// final receivingAddresses = DB.instance.get<dynamic>(
|
||||
|
|
|
@ -1255,10 +1255,15 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
final allAddresses = await db
|
||||
.getAddresses(walletId)
|
||||
.filter()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||
.or()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.change)
|
||||
.not()
|
||||
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||
.and()
|
||||
.group((q) => q
|
||||
.subTypeEqualTo(isar_models.AddressSubType.receiving)
|
||||
.or()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.change))
|
||||
.findAll();
|
||||
|
||||
// final List<String> allAddresses = [];
|
||||
// final receivingAddresses = DB.instance.get<dynamic>(
|
||||
// boxName: walletId, key: 'receivingAddressesP2WPKH') as List<dynamic>;
|
||||
|
|
Loading…
Reference in a new issue