mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 01:37:54 +00:00
do not check addresses until refresh initiated
This commit is contained in:
parent
5c7cc9932d
commit
197a2a1f19
10 changed files with 27 additions and 39 deletions
|
@ -1267,7 +1267,7 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
|
||||
@override
|
||||
Future<void> initializeExisting() async {
|
||||
Logging.instance.log("Opening existing ${coin.prettyName} wallet.",
|
||||
Logging.instance.log("initializeExisting() ${coin.prettyName} wallet.",
|
||||
level: LogLevel.Info);
|
||||
|
||||
if (getCachedId() == null) {
|
||||
|
@ -1276,8 +1276,8 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
}
|
||||
|
||||
await _prefs.init();
|
||||
await _checkCurrentChangeAddressesForTransactions();
|
||||
await _checkCurrentReceivingAddressesForTransactions();
|
||||
// await _checkCurrentChangeAddressesForTransactions();
|
||||
// await _checkCurrentReceivingAddressesForTransactions();
|
||||
}
|
||||
|
||||
// hack to add tx to txData before refresh completes
|
||||
|
|
|
@ -1195,7 +1195,7 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
|
||||
@override
|
||||
Future<void> initializeExisting() async {
|
||||
Logging.instance.log("Opening existing ${coin.prettyName} wallet.",
|
||||
Logging.instance.log("initializeExisting() ${coin.prettyName} wallet.",
|
||||
level: LogLevel.Info);
|
||||
|
||||
if (getCachedId() == null) {
|
||||
|
@ -1204,8 +1204,8 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
}
|
||||
|
||||
await _prefs.init();
|
||||
await _checkCurrentChangeAddressesForTransactions();
|
||||
await _checkCurrentReceivingAddressesForTransactions();
|
||||
// await _checkCurrentChangeAddressesForTransactions();
|
||||
// await _checkCurrentReceivingAddressesForTransactions();
|
||||
}
|
||||
|
||||
// hack to add tx to txData before refresh completes
|
||||
|
|
|
@ -1062,7 +1062,7 @@ class DogecoinWallet extends CoinServiceAPI
|
|||
|
||||
@override
|
||||
Future<void> initializeExisting() async {
|
||||
Logging.instance.log("Opening existing ${coin.prettyName} wallet.",
|
||||
Logging.instance.log("initializeExisting() ${coin.prettyName} wallet.",
|
||||
level: LogLevel.Info);
|
||||
|
||||
if (getCachedId() == null) {
|
||||
|
@ -1071,8 +1071,8 @@ class DogecoinWallet extends CoinServiceAPI
|
|||
}
|
||||
|
||||
await _prefs.init();
|
||||
await _checkCurrentChangeAddressesForTransactions();
|
||||
await _checkCurrentReceivingAddressesForTransactions();
|
||||
// await _checkCurrentChangeAddressesForTransactions();
|
||||
// await _checkCurrentReceivingAddressesForTransactions();
|
||||
}
|
||||
|
||||
// hack to add tx to txData before refresh completes
|
||||
|
|
|
@ -981,7 +981,7 @@ class EpicCashWallet extends CoinServiceAPI
|
|||
|
||||
@override
|
||||
Future<void> initializeExisting() async {
|
||||
Logging.instance.log("Opening existing ${coin.prettyName} wallet",
|
||||
Logging.instance.log("initializeExisting() ${coin.prettyName} wallet",
|
||||
level: LogLevel.Info);
|
||||
|
||||
final config = await getRealConfig();
|
||||
|
|
|
@ -1856,7 +1856,7 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive {
|
|||
@override
|
||||
Future<void> initializeExisting() async {
|
||||
Logging.instance.log(
|
||||
"Opening existing $_walletId ${coin.prettyName} wallet.",
|
||||
"initializeExisting() $_walletId ${coin.prettyName} wallet.",
|
||||
level: LogLevel.Info);
|
||||
|
||||
if (getCachedId() == null) {
|
||||
|
@ -1864,8 +1864,8 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB, FiroHive {
|
|||
"Attempted to initialize an existing wallet using an unknown wallet ID!");
|
||||
}
|
||||
await _prefs.init();
|
||||
await checkChangeAddressForTransactions();
|
||||
await checkReceivingAddressForTransactions();
|
||||
// await checkChangeAddressForTransactions();
|
||||
// await checkReceivingAddressForTransactions();
|
||||
}
|
||||
|
||||
Future<bool> refreshIfThereIsNewData() async {
|
||||
|
|
|
@ -1191,7 +1191,7 @@ class LitecoinWallet extends CoinServiceAPI
|
|||
|
||||
@override
|
||||
Future<void> initializeExisting() async {
|
||||
Logging.instance.log("Opening existing ${coin.prettyName} wallet.",
|
||||
Logging.instance.log("initializeExisting() ${coin.prettyName} wallet.",
|
||||
level: LogLevel.Info);
|
||||
|
||||
if (getCachedId() == null) {
|
||||
|
@ -1199,8 +1199,8 @@ class LitecoinWallet extends CoinServiceAPI
|
|||
"Attempted to initialize an existing wallet using an unknown wallet ID!");
|
||||
}
|
||||
await _prefs.init();
|
||||
await _checkCurrentChangeAddressesForTransactions();
|
||||
await _checkCurrentReceivingAddressesForTransactions();
|
||||
// await _checkCurrentChangeAddressesForTransactions();
|
||||
// await _checkCurrentReceivingAddressesForTransactions();
|
||||
}
|
||||
|
||||
// hack to add tx to txData before refresh completes
|
||||
|
|
|
@ -258,7 +258,7 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
@override
|
||||
Future<void> initializeExisting() async {
|
||||
Logging.instance.log(
|
||||
"Opening existing ${coin.prettyName} wallet $walletName...",
|
||||
"initializeExisting() ${coin.prettyName} wallet $walletName...",
|
||||
level: LogLevel.Info,
|
||||
);
|
||||
|
||||
|
@ -289,24 +289,12 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
walletBase = (await walletService!.openWallet(_walletId, password))
|
||||
as MoneroWalletBase;
|
||||
|
||||
await _checkCurrentReceivingAddressesForTransactions();
|
||||
// walletBase!.onNewBlock = onNewBlock;
|
||||
// walletBase!.onNewTransaction = onNewTransaction;
|
||||
// walletBase!.syncStatusChanged = syncStatusChanged;
|
||||
// await _checkCurrentReceivingAddressesForTransactions();
|
||||
|
||||
Logging.instance.log(
|
||||
"Opened existing ${coin.prettyName} wallet $walletName",
|
||||
level: LogLevel.Info,
|
||||
);
|
||||
// Wallet already exists, triggers for a returning user
|
||||
|
||||
// String indexKey = "receivingIndex";
|
||||
// final curIndex =
|
||||
// await DB.instance.get<dynamic>(boxName: walletId, key: indexKey) as int;
|
||||
// // Use new index to derive a new receiving address
|
||||
// final newReceivingAddress = await _generateAddressForChain(0, curIndex);
|
||||
// Logging.instance.log("xmr address in init existing: $newReceivingAddress",
|
||||
// level: LogLevel.Info);
|
||||
// _currentReceivingAddress = Future(() => newReceivingAddress);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -1181,7 +1181,7 @@ class NamecoinWallet extends CoinServiceAPI
|
|||
|
||||
@override
|
||||
Future<void> initializeExisting() async {
|
||||
Logging.instance.log("Opening existing ${coin.prettyName} wallet.",
|
||||
Logging.instance.log("initializeExisting() ${coin.prettyName} wallet.",
|
||||
level: LogLevel.Info);
|
||||
|
||||
if (getCachedId() == null) {
|
||||
|
@ -1189,8 +1189,8 @@ class NamecoinWallet extends CoinServiceAPI
|
|||
"Attempted to initialize an existing wallet using an unknown wallet ID!");
|
||||
}
|
||||
await _prefs.init();
|
||||
await _checkCurrentChangeAddressesForTransactions();
|
||||
await _checkCurrentReceivingAddressesForTransactions();
|
||||
// await _checkCurrentChangeAddressesForTransactions();
|
||||
// await _checkCurrentReceivingAddressesForTransactions();
|
||||
}
|
||||
|
||||
// hack to add tx to txData before refresh completes
|
||||
|
|
|
@ -1107,7 +1107,7 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
|
||||
@override
|
||||
Future<void> initializeExisting() async {
|
||||
Logging.instance.log("Opening existing ${coin.prettyName} wallet.",
|
||||
Logging.instance.log("initializeExisting() ${coin.prettyName} wallet.",
|
||||
level: LogLevel.Info);
|
||||
|
||||
if (getCachedId() == null) {
|
||||
|
@ -1115,8 +1115,8 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
"Attempted to initialize an existing wallet using an unknown wallet ID!");
|
||||
}
|
||||
await _prefs.init();
|
||||
await _checkCurrentChangeAddressesForTransactions();
|
||||
await _checkCurrentReceivingAddressesForTransactions();
|
||||
// await _checkCurrentChangeAddressesForTransactions();
|
||||
// await _checkCurrentReceivingAddressesForTransactions();
|
||||
}
|
||||
|
||||
// TODO make sure this copied implementation from bitcoin_wallet.dart applies for particl just as well--or import it
|
||||
|
|
|
@ -281,7 +281,7 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
@override
|
||||
Future<void> initializeExisting() async {
|
||||
Logging.instance.log(
|
||||
"Opening existing ${coin.prettyName} wallet $walletName...",
|
||||
"initializeExisting() ${coin.prettyName} wallet $walletName...",
|
||||
level: LogLevel.Info);
|
||||
|
||||
if (getCachedId() == null) {
|
||||
|
@ -306,7 +306,7 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
walletBase = (await walletService?.openWallet(_walletId, password!))
|
||||
as WowneroWalletBase;
|
||||
|
||||
await _checkCurrentReceivingAddressesForTransactions();
|
||||
// await _checkCurrentReceivingAddressesForTransactions();
|
||||
|
||||
Logging.instance.log(
|
||||
"Opened existing ${coin.prettyName} wallet $walletName",
|
||||
|
|
Loading…
Reference in a new issue