History: set correct fiat currency

This commit is contained in:
tobtoht
2021-10-21 21:38:39 +02:00
parent 9b22aa25a5
commit 130733ad98
7 changed files with 13 additions and 34 deletions
-18
View File
@@ -55,9 +55,6 @@ AppContext::AppContext(Wallet *wallet)
this->updateBalance();
// force trigger preferredFiat signal for history model
this->onPreferredFiatCurrencyChanged(config()->get(Config::preferredFiatCurrency).toString());
connect(this->wallet->history(), &TransactionHistory::txNoteChanged, [this]{
this->wallet->history()->refresh(this->wallet->currentSubaddressAccount());
});
@@ -167,21 +164,6 @@ QString AppContext::getCacheTransaction(const QString &txid) const {
return txHex;
}
// ################## Models ##################
void AppContext::onPreferredFiatCurrencyChanged(const QString &symbol) {
auto *model = this->wallet->transactionHistoryModel();
if (model != nullptr) {
model->preferredFiatSymbol = symbol;
}
}
void AppContext::onAmountPrecisionChanged(int precision) {
auto *model = this->wallet->transactionHistoryModel();
if (!model) return;
model->amountPrecision = precision;
}
// ################## Device ##################
void AppContext::onDeviceButtonRequest(quint64 code) {