diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2021-07-06 11:42:09 -0400 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2021-07-06 11:42:09 -0400 |
| commit | 6e87e2cb5b044dc4741f18575b8d38849a9db957 (patch) | |
| tree | 467c81a5eeb665a82496b33f5e1dd84abea73128 | |
| parent | 873074320734e555ebfad59e33bab71b7e2e9368 (diff) | |
| parent | 823627790651608ed0047f7dfec273f4434d0a9b (diff) | |
| download | monzero-gui-6e87e2cb5b044dc4741f18575b8d38849a9db957.tar.gz monzero-gui-6e87e2cb5b044dc4741f18575b8d38849a9db957.tar.xz monzero-gui-6e87e2cb5b044dc4741f18575b8d38849a9db957.zip | |
Merge pull request #3504
8236277 main: simplify fiat ticker code (selsta)
| -rw-r--r-- | main.qml | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -99,8 +99,7 @@ ApplicationWindow { property bool themeTransition: false // fiat price conversion - property real fiatPriceXMRUSD: 0 - property real fiatPriceXMREUR: 0 + property real fiatPrice: 0 property var fiatPriceAPIs: { return { "kraken": { @@ -1201,10 +1200,7 @@ ApplicationWindow { return; } - if(persistentSettings.fiatPriceCurrency === "xmrusd") - appWindow.fiatPriceXMRUSD = ticker; - else if(persistentSettings.fiatPriceCurrency === "xmreur") - appWindow.fiatPriceXMREUR = ticker; + appWindow.fiatPrice = ticker; appWindow.updateBalance(); } @@ -1243,7 +1239,7 @@ ApplicationWindow { } function fiatApiConvertToFiat(amount) { - var ticker = persistentSettings.fiatPriceCurrency === "xmrusd" ? appWindow.fiatPriceXMRUSD : appWindow.fiatPriceXMREUR; + const ticker = appWindow.fiatPrice; if(ticker <= 0){ fiatApiError("Invalid ticker value: " + ticker); return "?.??"; |
