parent
77c5084355
commit
c256ac0ac2
|
@ -114,12 +114,12 @@ QtObject {
|
|||
mainModuleInst.resolveENS(value, "")
|
||||
}
|
||||
|
||||
function getWei2Eth(wei) {
|
||||
return globalUtils.wei2Eth(wei,18)
|
||||
function getWei2Eth(wei, decimals) {
|
||||
return globalUtils.wei2Eth(wei, decimals)
|
||||
}
|
||||
|
||||
function getEth2Wei(eth) {
|
||||
return globalUtils.eth2Wei(eth, 18)
|
||||
function getEth2Wei(eth, decimals) {
|
||||
return globalUtils.eth2Wei(eth, decimals)
|
||||
}
|
||||
|
||||
function plainText(text) {
|
||||
|
|
|
@ -33,7 +33,7 @@ Item {
|
|||
property bool interactive: true
|
||||
property var weiToEth: function(wei) {}
|
||||
|
||||
signal reCalculateSuggestedRoute()
|
||||
property var reCalculateSuggestedRoute: function() {}
|
||||
|
||||
QtObject {
|
||||
id: d
|
||||
|
|
|
@ -79,7 +79,7 @@ Item {
|
|||
amountToSend: root.amountToSend
|
||||
isLoading: root.isLoading
|
||||
weiToEth: function(wei) {
|
||||
return "%1 %2".arg(LocaleUtils.numberToLocaleString(parseFloat(store.getWei2Eth(wei)))).arg(selectedAsset.symbol)
|
||||
return "%1 %2".arg(LocaleUtils.numberToLocaleString(parseFloat(store.getWei2Eth(wei, selectedAsset.decimals)))).arg(selectedAsset.symbol)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ Item {
|
|||
isLoading: root.isLoading
|
||||
interactive: root.interactive
|
||||
weiToEth: function(wei) {
|
||||
return parseFloat(store.getWei2Eth(wei))
|
||||
return parseFloat(store.getWei2Eth(wei, selectedAsset.decimals))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ Item {
|
|||
isLoading: root.isLoading
|
||||
interactive: root.interactive
|
||||
weiToEth: function(wei) {
|
||||
return parseFloat(store.getWei2Eth(wei))
|
||||
return parseFloat(store.getWei2Eth(wei, selectedAsset.decimals))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,9 @@ ColumnLayout {
|
|||
customMode: root.customMode
|
||||
requiredGasInEth: root.requiredGasInEth
|
||||
selectedAsset: root.selectedAsset
|
||||
onReCalculateSuggestedRoute: root.reCalculateSuggestedRoute()
|
||||
reCalculateSuggestedRoute: function() {
|
||||
root.reCalculateSuggestedRoute()
|
||||
}
|
||||
bestRoutes: root.bestRoutes
|
||||
weiToEth: root.weiToEth
|
||||
interactive: root.interactive
|
||||
|
|
Loading…
Reference in New Issue