mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
isar inspector active in debug mode and add single transaction fetch function
This commit is contained in:
parent
9b74f52ce9
commit
b76c9e6c6b
1 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:stackwallet/models/isar/models/isar_models.dart';
|
||||
import 'package:stackwallet/utilities/stack_file_system.dart';
|
||||
|
@ -28,7 +29,7 @@ class MainDB {
|
|||
AddressSchema,
|
||||
],
|
||||
directory: (await StackFileSystem.applicationIsarDirectory()).path,
|
||||
inspector: false,
|
||||
inspector: kDebugMode,
|
||||
name: "wallet_data",
|
||||
);
|
||||
return true;
|
||||
|
@ -73,6 +74,10 @@ class MainDB {
|
|||
await isar.transactions.putAll(transactions);
|
||||
});
|
||||
|
||||
Future<Transaction?> getTransaction(String walletId, String txid) async {
|
||||
return isar.transactions.getByTxidWalletId(txid, walletId);
|
||||
}
|
||||
|
||||
// utxos
|
||||
QueryBuilder<UTXO, UTXO, QAfterWhereClause> getUTXOs(String walletId) =>
|
||||
isar.utxos.where().walletIdEqualTo(walletId);
|
||||
|
|
Loading…
Reference in a new issue