Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete unnecessary code #155

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/bloc/crypto/crypto_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,9 @@ class CryptoBloc extends Bloc<CryptoEvent, CryptoState> {
internalAccounts[internalIndex] = _account;
internalIndex += 1;
}
ApiDatabase database = Locator.instance.get<ApiDatabase>();
await ApiPreferences.setCurrentWallet(_wallet.id);
await ApiPreferences.setCurrentAddress(
AddressEntry(walletId: _wallet.id, addressIdx: "0", keyType: 0));
await database.loadWalletsDatabase();
add(CryptoInitWalletDoneEvent(
wallet: _wallet,
password: event.password,
Expand Down
13 changes: 0 additions & 13 deletions lib/shared/api_database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,4 @@ class ApiDatabase {
method: 'update',
params: {'type': 'account', 'value': account.jsonMap()});
}

Future<WalletStorage> getWalletStorage([bool reload = false]) async {
if (reload) {
walletStorage = await loadWalletsDatabase();
return walletStorage;
}
if (walletsLoaded) {
return walletStorage;
} else {
walletStorage = await loadWalletsDatabase();
return walletStorage;
}
}
}