mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
minor fixes
This commit is contained in:
@@ -43,9 +43,9 @@ class LightningWallet {
|
||||
|
||||
void _subscribeToLogStream(File logFile) {
|
||||
_logSubscription = _logStream?.listen((logEntry) {
|
||||
logFile.writeAsString("[${logEntry.level}] ${logEntry.line}\n", mode: FileMode.append);
|
||||
logFile.writeAsStringSync("[${logEntry.level}] ${logEntry.line}\n", mode: FileMode.append);
|
||||
}, onError: (e) {
|
||||
logFile.writeAsString("[ERROR] $e\n", mode: FileMode.append);
|
||||
logFile.writeAsStringSync("[ERROR] $e\n", mode: FileMode.append);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -146,13 +146,15 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo
|
||||
}
|
||||
|
||||
if (!fiatConversionStore.prices.containsKey(cryptoCurrency)) return "";
|
||||
return (double.parse(_amount) * fiatConversionStore.prices[cryptoCurrency]!).toStringAsFixed(2);
|
||||
final amount = double.tryParse(_amount) ?? 0;
|
||||
return (amount * fiatConversionStore.prices[cryptoCurrency]!).toStringAsFixed(2);
|
||||
}
|
||||
|
||||
@computed
|
||||
String get selectedCurrencyFiatAmount {
|
||||
if (_fiatRate == null) return "";
|
||||
return (double.parse(_amount) * _fiatRate!).toStringAsFixed(2);
|
||||
final amount = double.tryParse(_amount) ?? 0;
|
||||
return (amount * _fiatRate!).toStringAsFixed(2);
|
||||
}
|
||||
|
||||
@action
|
||||
|
||||
Reference in New Issue
Block a user