parent
289005c0e6
commit
64d6c484b2
|
@ -29,8 +29,11 @@ QtObject {
|
|||
|
||||
function numberFromLocaleString(num, locale = null) {
|
||||
locale = locale || Qt.locale()
|
||||
|
||||
try {
|
||||
return Number.fromLocaleString(locale, num)
|
||||
} catch (_) {
|
||||
return parseFloat(num)
|
||||
}
|
||||
}
|
||||
|
||||
function currencyAmountToLocaleString(currencyAmount, options = null, locale = null) {
|
||||
|
|
|
@ -23,14 +23,20 @@ ColumnLayout {
|
|||
Binding {
|
||||
target: root
|
||||
property: "cryptoValueToSend"
|
||||
value: root.selectedAsset, !inputIsFiat ? getCryptoCurrencyAmount(LocaleUtils.numberFromLocaleString(topAmountToSendInput.text)) : getCryptoValue(fiatValueToSend ? fiatValueToSend.amount : 0.0)
|
||||
value: {
|
||||
const value = !inputIsFiat ? getCryptoCurrencyAmount(LocaleUtils.numberFromLocaleString(topAmountToSendInput.text)) : getCryptoValue(fiatValueToSend ? fiatValueToSend.amount : 0.0)
|
||||
return root.selectedAsset, value
|
||||
}
|
||||
delayed: true
|
||||
}
|
||||
property var fiatValueToSend
|
||||
Binding {
|
||||
target: root
|
||||
property: "fiatValueToSend"
|
||||
value: root.selectedAsset, inputIsFiat ? getFiatCurrencyAmount(LocaleUtils.numberFromLocaleString(topAmountToSendInput.text)) : getFiatValue(cryptoValueToSend ? cryptoValueToSend.amount : 0.0)
|
||||
value: {
|
||||
const value = inputIsFiat ? getFiatCurrencyAmount(LocaleUtils.numberFromLocaleString(topAmountToSendInput.text)) : getFiatValue(cryptoValueToSend ? cryptoValueToSend.amount : 0.0)
|
||||
return root.selectedAsset, value
|
||||
}
|
||||
delayed: true
|
||||
}
|
||||
property string currentCurrency
|
||||
|
|
Loading…
Reference in New Issue