mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-21 06:18:42 +02:00
Fixes
This commit is contained in:
@@ -138,7 +138,9 @@ abstract class DashboardViewModelBase with Store {
|
||||
appStore.settingsStore.balanceDisplayMode;
|
||||
|
||||
@computed
|
||||
List<TradeListItem> get trades => tradesStore.trades;
|
||||
List<TradeListItem> get trades => tradesStore.trades
|
||||
.where((trade) => trade.trade.walletId == wallet.id)
|
||||
.toList();
|
||||
|
||||
@computed
|
||||
double get price => balanceViewModel.price;
|
||||
@@ -153,6 +155,7 @@ abstract class DashboardViewModelBase with Store {
|
||||
return formattedItemsList(_items);
|
||||
}
|
||||
|
||||
@observable
|
||||
WalletBase wallet;
|
||||
|
||||
BalanceViewModel balanceViewModel;
|
||||
@@ -174,7 +177,9 @@ abstract class DashboardViewModelBase with Store {
|
||||
await wallet.connectToNode(node: node);
|
||||
}
|
||||
|
||||
@action
|
||||
void _onWalletChange(WalletBase wallet) {
|
||||
this.wallet = wallet;
|
||||
name = wallet.name;
|
||||
transactions.clear();
|
||||
transactions.addAll(wallet.transactionHistory.transactions.values.map(
|
||||
|
||||
@@ -137,7 +137,7 @@ abstract class ExchangeViewModelBase with Store {
|
||||
return;
|
||||
}
|
||||
|
||||
final _amount = double.parse(amount) ?? 0;
|
||||
final _amount = double.parse(amount.replaceAll(',', '.')) ?? 0;
|
||||
|
||||
provider
|
||||
.calculateAmount(
|
||||
@@ -160,7 +160,7 @@ abstract class ExchangeViewModelBase with Store {
|
||||
return;
|
||||
}
|
||||
|
||||
final _amount = double.parse(amount);
|
||||
final _amount = double.parse(amount.replaceAll(',', '.'));
|
||||
provider
|
||||
.calculateAmount(
|
||||
from: depositCurrency, to: receiveCurrency, amount: _amount,
|
||||
|
||||
Reference in New Issue
Block a user