This commit is contained in:
M
2020-09-30 21:23:15 +03:00
parent 6da61649cb
commit fe147ff9ed
49 changed files with 702 additions and 731 deletions
+8 -3
View File
@@ -50,14 +50,15 @@ abstract class SendViewModelBase with Store {
@observable
bool sendAll;
@computed
double get estimatedFee =>
_wallet.calculateEstimatedFee(_settingsStore.transactionPriority);
FiatCurrency get fiat => _settingsStore.fiatCurrency;
TransactionPriority get transactionPriority =>
_settingsStore.transactionPriority;
double get estimatedFee =>
_wallet.calculateEstimatedFee(_settingsStore.transactionPriority);
CryptoCurrency get currency => _wallet.currency;
Validator get amountValidator => AmountValidator(type: _wallet.type);
@@ -139,6 +140,10 @@ abstract class SendViewModelBase with Store {
_updateCryptoAmount();
}
@action
void setTransactionPriority(TransactionPriority priority) =>
_settingsStore.transactionPriority = priority;
@action
void _updateFiatAmount() {
try {
@@ -109,9 +109,6 @@ abstract class WalletAddressListViewModelBase with Store {
return addressList;
}
set address(WalletAddressListItem address) => null;
// _wallet.address = address.address;
bool hasAccounts;
WalletBase _wallet;
@@ -129,6 +126,10 @@ abstract class WalletAddressListViewModelBase with Store {
return null;
}
@action
void setAddress(WalletAddressListItem address) =>
_wallet.address = address.address;
void _init() {
_baseItems = [];
@@ -31,6 +31,7 @@ abstract class WalletListViewModelBase with Store {
await _keyService.getWalletPassword(walletName: wallet.name);
final walletService = getIt.get<WalletService>(param1: wallet.type);
_appStore.wallet = await walletService.openWallet(wallet.name, password);
_updateList();
}
@action