* hv
* Change build version
This commit is contained in:
mkyq 2022-03-30 17:57:04 +02:00 committed by GitHub
parent e7e419bc83
commit 01150ef2a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
213 changed files with 23972 additions and 672 deletions

View file

@ -1,3 +1,5 @@
import 'package:cake_wallet/entities/fiat_currency.dart';
import 'package:cake_wallet/entities/update_haven_rate.dart';
import 'package:cw_core/transaction_history.dart';
import 'package:cw_core/balance.dart';
import 'package:cw_core/transaction_info.dart';
@ -51,7 +53,7 @@ void startCurrentWalletChangeReaction(AppStore appStore,
wallet) async {
try {
final node = settingsStore.getCurrentNode(wallet.type);
startWalletSyncStatusChangeReaction(wallet);
startWalletSyncStatusChangeReaction(wallet, fiatConversionStore);
startCheckConnectionReaction(wallet, settingsStore);
await getIt
.get<SharedPreferences>()
@ -60,6 +62,11 @@ void startCurrentWalletChangeReaction(AppStore appStore,
PreferencesKey.currentWalletType, serializeToInt(wallet.type));
await wallet.connectToNode(node: node);
if (wallet.type == WalletType.haven) {
settingsStore.fiatCurrency = FiatCurrency.usd;
await updateHavenRate(fiatConversionStore);
}
if (wallet.walletInfo.address?.isEmpty ?? true) {
wallet.walletInfo.address = wallet.walletAddresses.address;