mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-21 14:34:55 +01:00
FIX: Show last saved exchange rate
This commit is contained in:
parent
538688e7d7
commit
6de5e7da46
1 changed files with 3 additions and 1 deletions
|
@ -48,6 +48,8 @@ async function updateExchangeRate() {
|
|||
}
|
||||
} catch (Err) {
|
||||
console.warn(Err);
|
||||
const lastSavedExchangeRate = JSON.parse(await AsyncStorage.getItem(AppStorage.EXCHANGE_RATES));
|
||||
exchangeRates['BTC_' + preferredFiatCurrency.endPointKey] = lastSavedExchangeRate['BTC_' + preferredFiatCurrency.endPointKey] * 1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -69,7 +71,7 @@ async function startUpdater() {
|
|||
}
|
||||
|
||||
function satoshiToLocalCurrency(satoshi) {
|
||||
if (!exchangeRates['BTC_' + preferredFiatCurrency.endPointKey]) return satoshi;
|
||||
if (!exchangeRates['BTC_' + preferredFiatCurrency.endPointKey]) return '...';
|
||||
|
||||
let b = new BigNumber(satoshi);
|
||||
b = b
|
||||
|
|
Loading…
Add table
Reference in a new issue