mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 19:39:22 +00:00
Import wallets service and remove wallet at conclusion of tests
This commit is contained in:
parent
289f0b8959
commit
a3a36d02c3
1 changed files with 19 additions and 0 deletions
|
@ -34,6 +34,8 @@ import 'package:path_provider/path_provider.dart';
|
|||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart';
|
||||
|
||||
import 'package:stackwallet/services/wallets.dart';
|
||||
|
||||
import 'dart:developer' as developer;
|
||||
|
||||
// TODO trim down to the minimum imports above
|
||||
|
@ -48,6 +50,7 @@ KeyService? keysStorage;
|
|||
MoneroWalletBase? walletBase;
|
||||
late WalletCreationService _walletCreationService;
|
||||
dynamic _walletInfoSource;
|
||||
Wallets? walletsService;
|
||||
|
||||
String name = 'namee${Random().nextInt(10000000)}';
|
||||
int nettype = 0;
|
||||
|
@ -160,6 +163,22 @@ void main() async {
|
|||
await walletBase!.getTransactionAddress(1, 2), mainnetTestData[1][2]);
|
||||
});
|
||||
});
|
||||
|
||||
group("Mainnet wallet deletion test", () {
|
||||
test("Test mainnet wallet deletion", () async {
|
||||
// Remove wallet from wallet service
|
||||
walletService?.remove(name);
|
||||
walletsService?.removeWallet(walletId: name);
|
||||
|
||||
// TODO test deletion, get code from generation for checking if it already exists
|
||||
});
|
||||
|
||||
/*
|
||||
// wait for widget tree to dispose of any widgets watching the manager
|
||||
await Future<void>.delayed(const Duration(seconds: 1));
|
||||
walletsInstance.removeWallet(walletId: walletId);
|
||||
*/
|
||||
});
|
||||
/*
|
||||
group("Mainnet node tests", () {
|
||||
test("Test mainnet node connection", () async {
|
||||
|
|
Loading…
Reference in a new issue