remove unused hive inits

This commit is contained in:
julian 2023-01-12 12:54:22 -06:00
parent 3f830218a4
commit 4ab090cb92
10 changed files with 5 additions and 113 deletions

View file

@ -1455,12 +1455,6 @@ class BitcoinWallet extends CoinServiceAPI with WalletCache, WalletDB {
key: '${_walletId}_mnemonic', key: '${_walletId}_mnemonic',
value: bip39.generateMnemonic(strength: 256)); value: bip39.generateMnemonic(strength: 256));
// initialize address book entries
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'addressBookEntries',
value: <String, String>{});
// Generate and add addresses to relevant arrays // Generate and add addresses to relevant arrays
final initialAddresses = await Future.wait([ final initialAddresses = await Future.wait([
// P2WPKH // P2WPKH

View file

@ -1373,12 +1373,6 @@ class BitcoinCashWallet extends CoinServiceAPI with WalletCache, WalletDB {
key: '${_walletId}_mnemonic', key: '${_walletId}_mnemonic',
value: bip39.generateMnemonic(strength: 256)); value: bip39.generateMnemonic(strength: 256));
// initialize address book entries
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'addressBookEntries',
value: <String, String>{});
// Generate and add addresses to relevant arrays // Generate and add addresses to relevant arrays
final initialAddresses = await Future.wait([ final initialAddresses = await Future.wait([
// P2PKH // P2PKH

View file

@ -1233,12 +1233,6 @@ class DogecoinWallet extends CoinServiceAPI with WalletCache, WalletDB {
key: '${_walletId}_mnemonic', key: '${_walletId}_mnemonic',
value: bip39.generateMnemonic(strength: 256)); value: bip39.generateMnemonic(strength: 256));
// initialize address book entries
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'addressBookEntries',
value: <String, String>{});
// Generate and add addresses // Generate and add addresses
final initialReceivingAddressP2PKH = final initialReceivingAddressP2PKH =
await _generateAddressForChain(0, 0, DerivePathType.bip44); await _generateAddressForChain(0, 0, DerivePathType.bip44);

View file

@ -1066,11 +1066,6 @@ class EpicCashWallet extends CoinServiceAPI with WalletCache, WalletDB {
await DB.instance.put<dynamic>( await DB.instance.put<dynamic>(
boxName: walletId, key: "restoreHeight", value: bufferedCreateHeight); boxName: walletId, key: "restoreHeight", value: bufferedCreateHeight);
// initialize address book entries
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'addressBookEntries',
value: <String, String>{});
await DB.instance await DB.instance
.put<dynamic>(boxName: walletId, key: "isFavorite", value: false); .put<dynamic>(boxName: walletId, key: "isFavorite", value: false);
@ -1399,16 +1394,7 @@ class EpicCashWallet extends CoinServiceAPI with WalletCache, WalletDB {
} }
await DB.instance await DB.instance
.put<dynamic>(boxName: walletId, key: "changeIndex", value: 0); .put<dynamic>(boxName: walletId, key: "changeIndex", value: 0);
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'blocked_tx_hashes',
value: ["0xdefault"],
); // A list of transaction hashes to represent frozen utxos in wallet
// initialize address book entries
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'addressBookEntries',
value: <String, String>{});
await DB.instance await DB.instance
.put<dynamic>(boxName: walletId, key: "isFavorite", value: false); .put<dynamic>(boxName: walletId, key: "isFavorite", value: false);

View file

@ -2109,12 +2109,6 @@ class FiroWallet extends CoinServiceAPI with WalletCache, WalletDB {
key: '${_walletId}_mnemonic', key: '${_walletId}_mnemonic',
value: bip39.generateMnemonic(strength: 256)); value: bip39.generateMnemonic(strength: 256));
// initialize address book entries
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'addressBookEntries',
value: <String, String>{});
await DB.instance await DB.instance
.put<dynamic>(boxName: walletId, key: 'jindex', value: <dynamic>[]); .put<dynamic>(boxName: walletId, key: 'jindex', value: <dynamic>[]);
// Generate and add addresses to relevant arrays // Generate and add addresses to relevant arrays

View file

@ -1471,12 +1471,6 @@ class LitecoinWallet extends CoinServiceAPI with WalletCache, WalletDB {
key: '${_walletId}_mnemonic', key: '${_walletId}_mnemonic',
value: bip39.generateMnemonic(strength: 256)); value: bip39.generateMnemonic(strength: 256));
// initialize address book entries
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'addressBookEntries',
value: <String, String>{});
// Generate and add addresses to relevant arrays // Generate and add addresses to relevant arrays
final initialAddresses = await Future.wait([ final initialAddresses = await Future.wait([
// P2WPKH // P2WPKH

View file

@ -384,21 +384,6 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB {
await DB.instance await DB.instance
.put<dynamic>(boxName: walletId, key: "id", value: _walletId); .put<dynamic>(boxName: walletId, key: "id", value: _walletId);
// Set relevant indexes
await DB.instance
.put<dynamic>(boxName: walletId, key: "receivingIndex", value: 0);
await DB.instance
.put<dynamic>(boxName: walletId, key: "changeIndex", value: 0);
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'blocked_tx_hashes',
value: ["0xdefault"],
); // A list of transaction hashes to represent frozen utxos in wallet
// initialize address book entries
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'addressBookEntries',
value: <String, String>{});
await DB.instance await DB.instance
.put<dynamic>(boxName: walletId, key: "isFavorite", value: false); .put<dynamic>(boxName: walletId, key: "isFavorite", value: false);
@ -607,26 +592,10 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB {
// walletBase!.onNewBlock = onNewBlock; // walletBase!.onNewBlock = onNewBlock;
// walletBase!.onNewTransaction = onNewTransaction; // walletBase!.onNewTransaction = onNewTransaction;
// walletBase!.syncStatusChanged = syncStatusChanged; // walletBase!.syncStatusChanged = syncStatusChanged;
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'receivingAddresses',
value: [walletInfo.address!]);
await DB.instance
.put<dynamic>(boxName: walletId, key: "receivingIndex", value: 0);
await DB.instance await DB.instance
.put<dynamic>(boxName: walletId, key: "id", value: _walletId); .put<dynamic>(boxName: walletId, key: "id", value: _walletId);
await DB.instance
.put<dynamic>(boxName: walletId, key: "changeIndex", value: 0);
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'blocked_tx_hashes',
value: ["0xdefault"],
); // A list of transaction hashes to represent frozen utxos in wallet
// initialize address book entries
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'addressBookEntries',
value: <String, String>{});
await DB.instance await DB.instance
.put<dynamic>(boxName: walletId, key: "isFavorite", value: false); .put<dynamic>(boxName: walletId, key: "isFavorite", value: false);
} catch (e, s) { } catch (e, s) {

View file

@ -1449,12 +1449,6 @@ class NamecoinWallet extends CoinServiceAPI with WalletCache, WalletDB {
key: '${_walletId}_mnemonic', key: '${_walletId}_mnemonic',
value: bip39.generateMnemonic(strength: 256)); value: bip39.generateMnemonic(strength: 256));
// initialize address book entries
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'addressBookEntries',
value: <String, String>{});
// Generate and add addresses to relevant arrays // Generate and add addresses to relevant arrays
final initialAddresses = await Future.wait([ final initialAddresses = await Future.wait([
// P2WPKH // P2WPKH

View file

@ -1365,12 +1365,6 @@ class ParticlWallet extends CoinServiceAPI with WalletCache, WalletDB {
key: '${_walletId}_mnemonic', key: '${_walletId}_mnemonic',
value: bip39.generateMnemonic(strength: 256)); value: bip39.generateMnemonic(strength: 256));
// initialize address book entries
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'addressBookEntries',
value: <String, String>{});
// Generate and add addresses to relevant arrays // Generate and add addresses to relevant arrays
final initialAddresses = await Future.wait([ final initialAddresses = await Future.wait([
// P2WPKH // P2WPKH

View file

@ -393,11 +393,6 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB {
await DB.instance await DB.instance
.put<dynamic>(boxName: walletId, key: "id", value: _walletId); .put<dynamic>(boxName: walletId, key: "id", value: _walletId);
// initialize address book entries
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'addressBookEntries',
value: <String, String>{});
await DB.instance await DB.instance
.put<dynamic>(boxName: walletId, key: "isFavorite", value: false); .put<dynamic>(boxName: walletId, key: "isFavorite", value: false);
@ -609,26 +604,10 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB {
.add<WalletInfo>(boxName: WalletInfo.boxName, value: walletInfo); .add<WalletInfo>(boxName: WalletInfo.boxName, value: walletInfo);
walletBase?.close(); walletBase?.close();
walletBase = wallet as WowneroWalletBase; walletBase = wallet as WowneroWalletBase;
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'receivingAddresses',
value: [walletInfo.address!]);
await DB.instance
.put<dynamic>(boxName: walletId, key: "receivingIndex", value: 0);
await DB.instance await DB.instance
.put<dynamic>(boxName: walletId, key: "id", value: _walletId); .put<dynamic>(boxName: walletId, key: "id", value: _walletId);
await DB.instance
.put<dynamic>(boxName: walletId, key: "changeIndex", value: 0);
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'blocked_tx_hashes',
value: ["0xdefault"],
); // A list of transaction hashes to represent frozen utxos in wallet
// initialize address book entries
await DB.instance.put<dynamic>(
boxName: walletId,
key: 'addressBookEntries',
value: <String, String>{});
await DB.instance await DB.instance
.put<dynamic>(boxName: walletId, key: "isFavorite", value: false); .put<dynamic>(boxName: walletId, key: "isFavorite", value: false);
} catch (e, s) { } catch (e, s) {