2023-02-17 16:49:01 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
2024-05-28 17:39:41 +00:00
|
|
|
import StatusQ.Core.Utils 0.1 as SQUtils
|
2023-02-17 16:49:01 +00:00
|
|
|
|
2022-07-22 14:42:21 +00:00
|
|
|
import utils 1.0
|
2023-02-22 17:44:04 +00:00
|
|
|
import AppLayouts.Profile.stores 1.0
|
2022-07-22 14:42:21 +00:00
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: root
|
|
|
|
|
2023-01-08 22:23:51 +00:00
|
|
|
// Some token+currency-related functions are implemented in the profileSectionModule.
|
|
|
|
// We should probably refactor this and move those functions to some Wallet module.
|
2024-03-15 16:03:15 +00:00
|
|
|
property var _profileSectionModuleInst: profileSectionModule
|
2023-01-08 22:23:51 +00:00
|
|
|
|
2023-01-17 20:05:21 +00:00
|
|
|
function getModelIndexForKey(key) {
|
2024-06-12 20:43:08 +00:00
|
|
|
const idx = SQUtils.ModelUtils.indexOf(currenciesModel, "key", key)
|
|
|
|
return idx === -1 ? 0 : idx
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
2022-12-29 16:44:51 +00:00
|
|
|
|
2023-01-17 20:05:21 +00:00
|
|
|
function getModelIndexForShortName(shortName) {
|
2024-06-12 20:43:08 +00:00
|
|
|
const idx = SQUtils.ModelUtils.indexOf(currenciesModel, "shortName", shortName)
|
|
|
|
return idx === -1 ? 0 : idx
|
2023-01-17 20:05:21 +00:00
|
|
|
}
|
|
|
|
|
2023-02-17 16:49:01 +00:00
|
|
|
readonly property string currentCurrency: Global.appIsReady ? walletSection.currentCurrency : ""
|
|
|
|
readonly property int currentCurrencyModelIndex: getModelIndexForShortName(currentCurrency)
|
|
|
|
readonly property string currentCurrencySymbol: currenciesModel.get(currentCurrencyModelIndex).symbol ?? Qt.locale().currencySymbol(Locale.CurrencySymbol)
|
2022-12-29 16:44:51 +00:00
|
|
|
|
2022-07-22 14:42:21 +00:00
|
|
|
property ListModel currenciesModel: ListModel {
|
|
|
|
ListElement {
|
|
|
|
key: "usd"
|
|
|
|
shortName: "USD"
|
|
|
|
name: qsTr("US Dollars")
|
|
|
|
symbol: "$"
|
|
|
|
category: ""
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1fa-1f1f8.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "gbp"
|
|
|
|
shortName: "GBP"
|
|
|
|
name: qsTr("British Pound")
|
|
|
|
symbol: "£"
|
|
|
|
category: ""
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ec-1f1e7.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "eur"
|
|
|
|
shortName: "EUR"
|
|
|
|
name: qsTr("Euros")
|
|
|
|
symbol: "€"
|
|
|
|
category: ""
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ea-1f1fa.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "rub"
|
|
|
|
shortName: "RUB"
|
|
|
|
name: qsTr("Russian ruble")
|
|
|
|
symbol: "₽"
|
|
|
|
category: ""
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f7-1f1fa.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "krw"
|
|
|
|
shortName: "KRW"
|
|
|
|
name: qsTr("South Korean won")
|
|
|
|
symbol: "₩"
|
|
|
|
category: ""
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f0-1f1f7.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "eth"
|
|
|
|
shortName: "ETH"
|
|
|
|
name: qsTr("Ethereum")
|
|
|
|
symbol: "Ξ"
|
|
|
|
category: qsTr("Tokens")
|
|
|
|
imageSource: "../../../../imports/assets/png/tokens/ETH.png"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: true
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "btc"
|
|
|
|
shortName: "BTC"
|
|
|
|
name: qsTr("Bitcoin")
|
|
|
|
symbol: "฿"
|
|
|
|
category: qsTr("Tokens")
|
|
|
|
imageSource: "../../../../imports/assets/png/tokens/WBTC.png"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: true
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "stn"
|
|
|
|
shortName: "SNT"
|
|
|
|
name: qsTr("Status Network Token")
|
|
|
|
symbol: ""
|
|
|
|
category: qsTr("Tokens")
|
|
|
|
imageSource: "../../../../imports/assets/png/tokens/SNT.png"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: true
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "dai"
|
|
|
|
shortName: "DAI"
|
|
|
|
name: qsTr("Dai")
|
|
|
|
symbol: "◈"
|
|
|
|
category: qsTr("Tokens")
|
|
|
|
imageSource: "../../../../imports/assets/png/tokens/DAI.png"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: true
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "aed"
|
|
|
|
shortName: "AED"
|
|
|
|
name: qsTr("United Arab Emirates dirham")
|
|
|
|
symbol: "د.إ"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e6-1f1ea.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "afn"
|
|
|
|
shortName: "AFN"
|
|
|
|
name: qsTr("Afghan afghani")
|
|
|
|
symbol: "؋"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e6-1f1eb.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "ars"
|
|
|
|
shortName: "ARS"
|
|
|
|
name: qsTr("Argentine peso")
|
|
|
|
symbol: "$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e6-1f1f7.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "aud"
|
|
|
|
shortName: "AUD"
|
|
|
|
name: qsTr("Australian dollar")
|
|
|
|
symbol: "$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e6-1f1fa.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "bbd"
|
|
|
|
shortName: "BBD"
|
|
|
|
name: qsTr("Barbadian dollar")
|
|
|
|
symbol: "$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e7-1f1e7.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "bdt"
|
|
|
|
shortName: "BDT"
|
|
|
|
name: qsTr("Bangladeshi taka")
|
|
|
|
symbol: "Tk"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e7-1f1e9.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "bgn"
|
|
|
|
shortName: "BGN"
|
|
|
|
name: qsTr("Bulgarian lev")
|
|
|
|
symbol: "лв"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e7-1f1ec.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "bhd"
|
|
|
|
shortName: "BHD"
|
|
|
|
name: qsTr("Bahraini dinar")
|
|
|
|
symbol: "BD"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e7-1f1ed.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "bnd"
|
|
|
|
shortName: "BND"
|
|
|
|
name: qsTr("Brunei dollar")
|
|
|
|
symbol: "$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e7-1f1f3.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "bob"
|
|
|
|
shortName: "BOB"
|
|
|
|
name: qsTr("Bolivian boliviano")
|
|
|
|
symbol: "$b"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e7-1f1f4.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "brl"
|
|
|
|
shortName: "BRL"
|
|
|
|
name: qsTr("Brazillian real")
|
|
|
|
symbol: "R$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e7-1f1f7.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "btn"
|
|
|
|
shortName: "BTN"
|
|
|
|
name: qsTr("Bhutanese ngultrum")
|
|
|
|
symbol: "Nu."
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e7-1f1f9.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "cad"
|
|
|
|
shortName: "CAD"
|
|
|
|
name: qsTr("Canadian dollar")
|
|
|
|
symbol: "$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e8-1f1e6.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "chf"
|
|
|
|
shortName: "CHF"
|
|
|
|
name: qsTr("Swiss franc")
|
|
|
|
symbol: "CHF"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e8-1f1ed.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "clp"
|
|
|
|
shortName: "CLP"
|
|
|
|
name: qsTr("Chilean peso")
|
|
|
|
symbol: "$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e8-1f1f1.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "cny"
|
|
|
|
shortName: "CNY"
|
|
|
|
name: qsTr("Chinese yuan")
|
|
|
|
symbol: "¥"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e8-1f1f3.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "cop"
|
|
|
|
shortName: "COP"
|
|
|
|
name: qsTr("Colombian peso")
|
|
|
|
symbol: "$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e8-1f1f4.svg"
|
|
|
|
selected: false
|
2023-02-17 16:49:01 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "crc"
|
|
|
|
shortName: "CRC"
|
|
|
|
name: qsTr("Costa Rican colón")
|
|
|
|
symbol: "₡"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e8-1f1f7.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "czk"
|
|
|
|
shortName: "CZK"
|
|
|
|
name: qsTr("Czech koruna")
|
|
|
|
symbol: "Kč"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e8-1f1ff.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "dkk"
|
|
|
|
shortName: "DKK"
|
|
|
|
name: qsTr("Danish krone")
|
|
|
|
symbol: "kr"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e9-1f1f0.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "dop"
|
|
|
|
shortName: "DOP"
|
|
|
|
name: qsTr("Dominican peso")
|
|
|
|
symbol: "RD$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1e9-1f1f4.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "egp"
|
|
|
|
shortName: "EGP"
|
|
|
|
name: qsTr("Egyptian pound")
|
|
|
|
symbol: "£"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ea-1f1ec.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "etb"
|
|
|
|
shortName: "ETB"
|
|
|
|
name: qsTr("Ethiopian birr")
|
|
|
|
symbol: "Br"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ea-1f1f9.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "gel"
|
|
|
|
shortName: "GEL"
|
|
|
|
name: qsTr("Georgian lari")
|
|
|
|
symbol: "₾"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ec-1f1ea.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "ghs"
|
|
|
|
shortName: "GHS"
|
|
|
|
name: qsTr("Ghanaian cedi")
|
|
|
|
symbol: "¢"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ec-1f1ed.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "hkd"
|
|
|
|
shortName: "HKD"
|
|
|
|
name: qsTr("Hong Kong dollar")
|
|
|
|
symbol: "$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ed-1f1f0.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "hrk"
|
|
|
|
shortName: "HRK"
|
|
|
|
name: qsTr("Croatian kuna")
|
|
|
|
symbol: "kn"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ed-1f1f7.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "huf"
|
|
|
|
shortName: "HUF"
|
|
|
|
name: qsTr("Hungarian forint")
|
|
|
|
symbol: "Ft"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ed-1f1fa.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "idr"
|
|
|
|
shortName: "IDR"
|
|
|
|
name: qsTr("Indonesian rupiah")
|
|
|
|
symbol: "Rp"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ee-1f1e9.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "ils"
|
|
|
|
shortName: "ILS"
|
|
|
|
name: qsTr("Israeli new shekel")
|
|
|
|
symbol: "₪"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ee-1f1f1.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "inr"
|
|
|
|
shortName: "INR"
|
|
|
|
name: qsTr("Indian rupee")
|
|
|
|
symbol: "₹"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ee-1f1f3.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "isk"
|
|
|
|
shortName: "ISK"
|
|
|
|
name: qsTr("Icelandic króna")
|
|
|
|
symbol: "kr"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ee-1f1f8.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "jmd"
|
|
|
|
shortName: "JMD"
|
|
|
|
name: qsTr("Jamaican dollar")
|
|
|
|
symbol: "J$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ef-1f1f2.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "jpy"
|
|
|
|
shortName: "JPY"
|
|
|
|
name: qsTr("Japanese yen")
|
|
|
|
symbol: "¥"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ef-1f1f5.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "kes"
|
|
|
|
shortName: "KES"
|
|
|
|
name: qsTr("Kenyan shilling")
|
|
|
|
symbol: "KSh"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f0-1f1ea.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "kwd"
|
|
|
|
shortName: "KWD"
|
|
|
|
name: qsTr("Kuwaiti dinar")
|
|
|
|
symbol: "د.ك"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f0-1f1fc.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "kzt"
|
|
|
|
shortName: "KZT"
|
|
|
|
name: qsTr("Kazakhstani tenge")
|
|
|
|
symbol: "лв"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f0-1f1ff.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "lkr"
|
|
|
|
shortName: "LKR"
|
|
|
|
name: qsTr("Sri Lankan rupee")
|
|
|
|
symbol: "₨"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f1-1f1f0.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "mad"
|
|
|
|
shortName: "MAD"
|
|
|
|
name: qsTr("Moroccan dirham")
|
|
|
|
symbol: "MAD"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f2-1f1e6.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "mdl"
|
|
|
|
shortName: "MDL"
|
|
|
|
name: qsTr("Moldovan leu")
|
|
|
|
symbol: "MDL"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f2-1f1e9.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "mur"
|
|
|
|
shortName: "MUR"
|
|
|
|
name: qsTr("Mauritian rupee")
|
|
|
|
symbol: "₨"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f2-1f1f7.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "mwk"
|
|
|
|
shortName: "MWK"
|
|
|
|
name: qsTr("Malawian kwacha")
|
|
|
|
symbol: "MK"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f2-1f1fc.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "mxn"
|
|
|
|
shortName: "MXN"
|
|
|
|
name: qsTr("Mexican peso")
|
|
|
|
symbol: "$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f2-1f1fd.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "myr"
|
|
|
|
shortName: "MYR"
|
|
|
|
name: qsTr("Malaysian ringgit")
|
|
|
|
symbol: "RM"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f2-1f1fe.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "mzn"
|
|
|
|
shortName: "MZN"
|
|
|
|
name: qsTr("Mozambican metical")
|
|
|
|
symbol: "MT"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f2-1f1ff.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "nad"
|
|
|
|
shortName: "NAD"
|
|
|
|
name: qsTr("Namibian dollar")
|
|
|
|
symbol: "$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f3-1f1e6.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "ngn"
|
|
|
|
shortName: "NGN"
|
|
|
|
name: qsTr("Nigerian naira")
|
|
|
|
symbol: "₦"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f3-1f1ec.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "nok"
|
|
|
|
shortName: "NOK"
|
|
|
|
name: qsTr("Norwegian krone")
|
|
|
|
symbol: "kr"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f3-1f1f4.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "npr"
|
|
|
|
shortName: "NPR"
|
|
|
|
name: qsTr("Nepalese rupee")
|
|
|
|
symbol: "₨"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f3-1f1f5.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "nzd"
|
|
|
|
shortName: "NZD"
|
|
|
|
name: qsTr("New Zealand dollar")
|
|
|
|
symbol: "$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f3-1f1ff.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "omr"
|
|
|
|
shortName: "OMR"
|
|
|
|
name: qsTr("Omani rial")
|
|
|
|
symbol: "﷼"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f4-1f1f2.svg"
|
|
|
|
selected: false
|
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "pen"
|
|
|
|
shortName: "PEN"
|
|
|
|
name: qsTr("Peruvian sol")
|
|
|
|
symbol: "S/."
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f5-1f1ea.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "pgk"
|
|
|
|
shortName: "PGK"
|
|
|
|
name: qsTr("Papua New Guinean kina")
|
|
|
|
symbol: "K"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f5-1f1ec.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "php"
|
|
|
|
shortName: "PHP"
|
|
|
|
name: qsTr("Philippine peso")
|
|
|
|
symbol: "₱"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f5-1f1ed.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "pkr"
|
|
|
|
shortName: "PKR"
|
|
|
|
name: qsTr("Pakistani rupee")
|
|
|
|
symbol: "₨"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f5-1f1f0.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "pln"
|
|
|
|
shortName: "PLN"
|
|
|
|
name: qsTr("Polish złoty")
|
|
|
|
symbol: "zł"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f5-1f1f1.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "pyg"
|
|
|
|
shortName: "PYG"
|
|
|
|
name: qsTr("Paraguayan guaraní")
|
|
|
|
symbol: "Gs"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f5-1f1fe.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "qar"
|
|
|
|
shortName: "QAR"
|
|
|
|
name: qsTr("Qatari riyal")
|
|
|
|
symbol: "﷼"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f6-1f1e6.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "ron"
|
|
|
|
shortName: "RON"
|
|
|
|
name: qsTr("Romanian leu")
|
|
|
|
symbol: "lei"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f7-1f1f4.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "rsd"
|
|
|
|
shortName: "RSD"
|
|
|
|
name: qsTr("Serbian dinar")
|
|
|
|
symbol: "Дин."
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f7-1f1f8.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "sar"
|
|
|
|
shortName: "SAR"
|
|
|
|
name: qsTr("Saudi riyal")
|
|
|
|
symbol: "﷼"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f8-1f1e6.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "sek"
|
|
|
|
shortName: "SEK"
|
|
|
|
name: qsTr("Swedish krona")
|
|
|
|
symbol: "kr"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f8-1f1ea.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "sgd"
|
|
|
|
shortName: "SGD"
|
|
|
|
name: qsTr("Singapore dollar")
|
|
|
|
symbol: "$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f8-1f1ec.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "thb"
|
|
|
|
shortName: "THB"
|
|
|
|
name: qsTr("Thai baht")
|
|
|
|
symbol: "฿"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f9-1f1ed.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "ttd"
|
|
|
|
shortName: "TTD"
|
|
|
|
name: qsTr("Trinidad and Tobago dollar")
|
|
|
|
symbol: "TT$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f9-1f1f9.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "twd"
|
|
|
|
shortName: "TWD"
|
|
|
|
name: qsTr("New Taiwan dollar")
|
|
|
|
symbol: "NT$"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f9-1f1fc.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "tzs"
|
|
|
|
shortName: "TZS"
|
|
|
|
name: qsTr("Tanzanian shilling")
|
|
|
|
symbol: "TSh"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f9-1f1ff.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "try"
|
|
|
|
shortName: "TRY"
|
|
|
|
name: qsTr("Turkish lira")
|
|
|
|
symbol: "₺"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1f9-1f1f7.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "uah"
|
|
|
|
shortName: "UAH"
|
|
|
|
name: qsTr("Ukrainian hryvnia")
|
|
|
|
symbol: "₴"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1fa-1f1e6.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "ugx"
|
|
|
|
shortName: "UGX"
|
|
|
|
name: qsTr("Ugandan shilling")
|
|
|
|
symbol: "USh"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1fa-1f1ec.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "uyu"
|
|
|
|
shortName: "UYU"
|
|
|
|
name: qsTr("Uruguayan peso")
|
|
|
|
symbol: "$U"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1fa-1f1fe.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "vef"
|
|
|
|
shortName: "VEF"
|
|
|
|
name: qsTr("Venezuelan bolívar")
|
|
|
|
symbol: "Bs"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1fb-1f1ea.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "vnd"
|
|
|
|
shortName: "VND"
|
|
|
|
name: qsTr("Vietnamese đồng")
|
|
|
|
symbol: "₫"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1fb-1f1f3.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "zar"
|
|
|
|
shortName: "ZAR"
|
|
|
|
name: qsTr("South African rand")
|
|
|
|
symbol: "R"
|
|
|
|
category: qsTr("Other Fiat")
|
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ff-1f1e6.svg"
|
|
|
|
selected: false
|
2022-12-29 16:44:51 +00:00
|
|
|
isToken: false
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
onCurrentCurrencyChanged: { updateCurrenciesModel() }
|
|
|
|
|
|
|
|
function updateCurrenciesModel() {
|
|
|
|
var isSelected = false
|
|
|
|
for(var i = 0; i < currenciesModel.count; i++) {
|
2023-01-17 20:05:21 +00:00
|
|
|
if(root.currentCurrency === root.currenciesModel.get(i).shortName) {
|
2022-07-22 14:42:21 +00:00
|
|
|
root.currenciesModel.get(i).selected = isSelected = true
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
root.currenciesModel.get(i).selected = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Set default:
|
|
|
|
if(!isSelected)
|
|
|
|
root.currenciesModel.get(0).selected = true
|
|
|
|
}
|
|
|
|
|
2023-02-17 16:49:01 +00:00
|
|
|
function updateCurrency(newCurrencyKey) {
|
|
|
|
let index = getModelIndexForKey(newCurrencyKey)
|
2023-01-17 20:05:21 +00:00
|
|
|
let shortName = root.currenciesModel.get(index).shortName
|
|
|
|
walletSection.updateCurrency(shortName)
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|
2023-01-08 22:23:51 +00:00
|
|
|
|
2023-02-17 12:56:31 +00:00
|
|
|
// The object returned by this sometimes becomes null when used as part of a binding expression.
|
|
|
|
// Will probably be solved when moving to C++, for now avoid storing the result of this function and use
|
|
|
|
// formatCurrencyAmount at the visualization point instead, or move functionality over to the NIM side.
|
2023-01-08 22:23:51 +00:00
|
|
|
function getCurrencyAmount(amount, symbol) {
|
2023-02-17 12:56:31 +00:00
|
|
|
walletSection.prepareCurrencyAmount(amount, symbol)
|
|
|
|
return walletSection.getPreparedCurrencyAmount()
|
2023-01-08 22:23:51 +00:00
|
|
|
}
|
|
|
|
|
2023-02-17 12:56:31 +00:00
|
|
|
function formatCurrencyAmount(amount, symbol, options = null, locale = null) {
|
2023-03-08 19:35:18 +00:00
|
|
|
if (isNaN(amount)) {
|
2024-05-28 17:39:41 +00:00
|
|
|
return qsTr("N/A")
|
2023-03-08 19:35:18 +00:00
|
|
|
}
|
2023-02-17 12:56:31 +00:00
|
|
|
var currencyAmount = getCurrencyAmount(amount, symbol)
|
|
|
|
return LocaleUtils.currencyAmountToLocaleString(currencyAmount, options, locale)
|
2023-01-08 22:23:51 +00:00
|
|
|
}
|
|
|
|
|
2024-06-12 20:43:08 +00:00
|
|
|
function formatCurrencyAmountFromBigInt(balance, symbol, decimals, options = null) {
|
2024-05-28 17:39:41 +00:00
|
|
|
let bigIntBalance = SQUtils.AmountsArithmetic.fromString(balance)
|
|
|
|
let decimalBalance = SQUtils.AmountsArithmetic.toNumber(bigIntBalance, decimals)
|
2024-06-12 20:43:08 +00:00
|
|
|
return formatCurrencyAmount(decimalBalance, symbol, options)
|
2024-05-28 17:39:41 +00:00
|
|
|
}
|
|
|
|
|
2024-07-31 10:04:51 +00:00
|
|
|
function formatBigNumber(number: string, symbol: string, noSymbolOption: bool) {
|
|
|
|
if (!number)
|
|
|
|
return "N/A"
|
|
|
|
if (!symbol)
|
|
|
|
symbol = root.currentCurrency
|
|
|
|
let options = {}
|
|
|
|
if (!!noSymbolOption)
|
|
|
|
options = {noSymbol: true}
|
|
|
|
return formatCurrencyAmount(parseFloat(number), symbol, options)
|
|
|
|
}
|
|
|
|
|
2024-02-05 16:44:49 +00:00
|
|
|
function getFiatValue(cryptoAmount, cryptoSymbol) {
|
2024-03-15 16:03:15 +00:00
|
|
|
var amount = _profileSectionModuleInst.ensUsernamesModule.getFiatValue(cryptoAmount, cryptoSymbol)
|
2023-02-17 12:56:31 +00:00
|
|
|
return parseFloat(amount)
|
2023-01-08 22:23:51 +00:00
|
|
|
}
|
|
|
|
|
2024-02-05 16:44:49 +00:00
|
|
|
function getCryptoValue(fiatAmount, cryptoSymbol) {
|
2024-03-15 16:03:15 +00:00
|
|
|
var amount = _profileSectionModuleInst.ensUsernamesModule.getCryptoValue(fiatAmount, cryptoSymbol)
|
2023-02-17 12:56:31 +00:00
|
|
|
return parseFloat(amount)
|
2023-01-08 22:23:51 +00:00
|
|
|
}
|
|
|
|
|
2023-02-17 12:56:31 +00:00
|
|
|
function getGasEthValue(gweiValue, gasLimit) {
|
2024-03-15 16:03:15 +00:00
|
|
|
var amount = _profileSectionModuleInst.ensUsernamesModule.getGasEthValue(gweiValue, gasLimit)
|
2023-02-17 12:56:31 +00:00
|
|
|
return parseFloat(amount)
|
2023-01-08 22:23:51 +00:00
|
|
|
}
|
2023-11-24 12:16:13 +00:00
|
|
|
|
|
|
|
function getCurrentCurrencyAmount(amount) {
|
|
|
|
return getCurrencyAmount(amount, currentCurrency)
|
|
|
|
}
|
2022-07-22 14:42:21 +00:00
|
|
|
}
|