2023-05-10 11:05:45 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
2023-09-26 13:45:44 +00:00
|
|
|
QtObject {
|
2023-12-18 10:12:57 +00:00
|
|
|
id: root
|
|
|
|
|
2023-09-26 13:45:44 +00:00
|
|
|
readonly property string currentCurrency: "USD"
|
|
|
|
property string currentCurrencySymbol: "$"
|
|
|
|
|
|
|
|
function formatCurrencyAmount(amount, symbol, options = null, locale = null) {
|
|
|
|
return amount
|
|
|
|
}
|
|
|
|
|
|
|
|
function getFiatValue(balance, cryptoSymbol, fiatSymbol) {
|
|
|
|
return balance
|
|
|
|
}
|
2023-12-18 10:12:57 +00:00
|
|
|
|
|
|
|
function getCurrencyAmount(amount, symbol) {
|
|
|
|
return ({
|
|
|
|
amount: amount,
|
|
|
|
symbol: symbol ? symbol.toUpperCase() : root.currentCurrency,
|
|
|
|
displayDecimals: 2,
|
|
|
|
stripTrailingZeroes: false
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
function getCurrentCurrencyAmount(amount) {
|
|
|
|
return ({
|
|
|
|
amount: amount,
|
|
|
|
symbol: root.currentCurrency,
|
|
|
|
displayDecimals: 2,
|
|
|
|
stripTrailingZeroes: false
|
|
|
|
})
|
|
|
|
}
|
2023-09-26 13:45:44 +00:00
|
|
|
}
|