mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +00:00
clean up code
This commit is contained in:
parent
02997ffc70
commit
b17b8d0b4b
1 changed files with 4 additions and 5 deletions
|
@ -39,6 +39,7 @@ import 'package:stackwallet/wallets/wallet/impl/monero_wallet.dart';
|
||||||
import 'package:stackwallet/wallets/wallet/impl/namecoin_wallet.dart';
|
import 'package:stackwallet/wallets/wallet/impl/namecoin_wallet.dart';
|
||||||
import 'package:stackwallet/wallets/wallet/impl/nano_wallet.dart';
|
import 'package:stackwallet/wallets/wallet/impl/nano_wallet.dart';
|
||||||
import 'package:stackwallet/wallets/wallet/impl/particl_wallet.dart';
|
import 'package:stackwallet/wallets/wallet/impl/particl_wallet.dart';
|
||||||
|
import 'package:stackwallet/wallets/wallet/impl/solana_wallet.dart';
|
||||||
import 'package:stackwallet/wallets/wallet/impl/stellar_wallet.dart';
|
import 'package:stackwallet/wallets/wallet/impl/stellar_wallet.dart';
|
||||||
import 'package:stackwallet/wallets/wallet/impl/sub_wallets/eth_token_wallet.dart';
|
import 'package:stackwallet/wallets/wallet/impl/sub_wallets/eth_token_wallet.dart';
|
||||||
import 'package:stackwallet/wallets/wallet/impl/tezos_wallet.dart';
|
import 'package:stackwallet/wallets/wallet/impl/tezos_wallet.dart';
|
||||||
|
@ -52,8 +53,6 @@ import 'package:stackwallet/wallets/wallet/wallet_mixin_interfaces/paynym_interf
|
||||||
import 'package:stackwallet/wallets/wallet/wallet_mixin_interfaces/private_key_interface.dart';
|
import 'package:stackwallet/wallets/wallet/wallet_mixin_interfaces/private_key_interface.dart';
|
||||||
import 'package:stackwallet/wallets/wallet/wallet_mixin_interfaces/spark_interface.dart';
|
import 'package:stackwallet/wallets/wallet/wallet_mixin_interfaces/spark_interface.dart';
|
||||||
|
|
||||||
import 'impl/solana_wallet.dart';
|
|
||||||
|
|
||||||
abstract class Wallet<T extends CryptoCurrency> {
|
abstract class Wallet<T extends CryptoCurrency> {
|
||||||
// default to Transaction class. For TransactionV2 set to 2
|
// default to Transaction class. For TransactionV2 set to 2
|
||||||
int get isarTransactionVersion => 1;
|
int get isarTransactionVersion => 1;
|
||||||
|
@ -398,10 +397,10 @@ abstract class Wallet<T extends CryptoCurrency> {
|
||||||
}
|
}
|
||||||
|
|
||||||
void _periodicPingCheck() async {
|
void _periodicPingCheck() async {
|
||||||
bool hasNetwork = await pingCheck();
|
final bool hasNetwork = await pingCheck();
|
||||||
|
|
||||||
if (_isConnected != hasNetwork) {
|
if (_isConnected != hasNetwork) {
|
||||||
NodeConnectionStatus status = hasNetwork
|
final NodeConnectionStatus status = hasNetwork
|
||||||
? NodeConnectionStatus.connected
|
? NodeConnectionStatus.connected
|
||||||
: NodeConnectionStatus.disconnected;
|
: NodeConnectionStatus.disconnected;
|
||||||
GlobalEventBus.instance.fire(
|
GlobalEventBus.instance.fire(
|
||||||
|
@ -638,7 +637,7 @@ abstract class Wallet<T extends CryptoCurrency> {
|
||||||
// Close the subscription if this wallet is not in the list to be synced.
|
// Close the subscription if this wallet is not in the list to be synced.
|
||||||
if (!prefs.walletIdsSyncOnStartup.contains(walletId)) {
|
if (!prefs.walletIdsSyncOnStartup.contains(walletId)) {
|
||||||
// Check if there's another wallet of this coin on the sync list.
|
// Check if there's another wallet of this coin on the sync list.
|
||||||
List<String> walletIds = [];
|
final List<String> walletIds = [];
|
||||||
for (final id in prefs.walletIdsSyncOnStartup) {
|
for (final id in prefs.walletIdsSyncOnStartup) {
|
||||||
final wallet = mainDB.isar.walletInfo
|
final wallet = mainDB.isar.walletInfo
|
||||||
.where()
|
.where()
|
||||||
|
|
Loading…
Reference in a new issue