mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-12 08:53:57 +01:00
Fixes for update fiat rate after change of current wallet type. Fixes for change amount for btc transactions. Changed displaying of balance for btc wallet. General fixes.
This commit is contained in:
@@ -26,4 +26,10 @@ abstract class AppStoreBase with Store {
|
||||
SettingsStore settingsStore;
|
||||
|
||||
NodeListStore nodeListStore;
|
||||
|
||||
@action
|
||||
void changeCurrentWallet(WalletBase wallet) {
|
||||
this.wallet?.close();
|
||||
this.wallet = wallet;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import 'package:cake_wallet/entities/crypto_currency.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
|
||||
part 'fiat_conversion_store.g.dart';
|
||||
|
||||
class FiatConversionStore = FiatConversionStoreBase
|
||||
with _$FiatConversionStore;
|
||||
class FiatConversionStore = FiatConversionStoreBase with _$FiatConversionStore;
|
||||
|
||||
abstract class FiatConversionStoreBase with Store {
|
||||
FiatConversionStoreBase() : price = 0.0;
|
||||
FiatConversionStoreBase() : prices = ObservableMap<CryptoCurrency, double>();
|
||||
|
||||
@observable
|
||||
double price;
|
||||
ObservableMap<CryptoCurrency, double> prices;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,6 @@ abstract class SettingsStoreBase with Store {
|
||||
isDarkTheme = initialDarkTheme;
|
||||
pinCodeLength = initialPinLength;
|
||||
languageCode = initialLanguageCode;
|
||||
currentNode = nodes[WalletType.monero];
|
||||
this.nodes = ObservableMap<WalletType, Node>.of(nodes);
|
||||
_sharedPreferences = sharedPreferences;
|
||||
|
||||
@@ -80,13 +79,14 @@ abstract class SettingsStoreBase with Store {
|
||||
(int pinLength) => sharedPreferences.setInt(
|
||||
PreferencesKey.currentPinLength, pinLength));
|
||||
|
||||
reaction((_) => currentNode,
|
||||
(Node node) => _saveCurrentNode(node, WalletType.monero));
|
||||
|
||||
reaction(
|
||||
(_) => languageCode,
|
||||
(String languageCode) => sharedPreferences.setString(
|
||||
PreferencesKey.currentLanguageCode, languageCode));
|
||||
|
||||
this
|
||||
.nodes
|
||||
.observe((change) => _saveCurrentNode(change.newValue, change.key));
|
||||
}
|
||||
|
||||
static const defaultPinLength = 4;
|
||||
@@ -116,9 +116,6 @@ abstract class SettingsStoreBase with Store {
|
||||
@observable
|
||||
int pinCodeLength;
|
||||
|
||||
@observable
|
||||
Node currentNode;
|
||||
|
||||
@computed
|
||||
ThemeData get theme => isDarkTheme ? Themes.darkTheme : Themes.lightTheme;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user