diff --git a/lib/bloc/crypto/crypto_bloc.dart b/lib/bloc/crypto/crypto_bloc.dart index fec8cb5c..0ed9f4d9 100644 --- a/lib/bloc/crypto/crypto_bloc.dart +++ b/lib/bloc/crypto/crypto_bloc.dart @@ -158,11 +158,9 @@ class CryptoBloc extends Bloc { internalAccounts[internalIndex] = _account; internalIndex += 1; } - ApiDatabase database = Locator.instance.get(); 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, diff --git a/lib/shared/api_database.dart b/lib/shared/api_database.dart index a6172676..6d879943 100644 --- a/lib/shared/api_database.dart +++ b/lib/shared/api_database.dart @@ -193,17 +193,4 @@ class ApiDatabase { method: 'update', params: {'type': 'account', 'value': account.jsonMap()}); } - - Future getWalletStorage([bool reload = false]) async { - if (reload) { - walletStorage = await loadWalletsDatabase(); - return walletStorage; - } - if (walletsLoaded) { - return walletStorage; - } else { - walletStorage = await loadWalletsDatabase(); - return walletStorage; - } - } }