mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 03:59:38 +00:00
QML: fix warnings
This commit is contained in:
parent
c7956f76ea
commit
c34a2b43fc
3 changed files with 5 additions and 4 deletions
|
@ -12,13 +12,13 @@ function destinationsToAddress(destinations){
|
||||||
}
|
}
|
||||||
|
|
||||||
function addressTruncate(address, range){
|
function addressTruncate(address, range){
|
||||||
if(typeof(address) === "undefined") return;
|
if(typeof(address) === "undefined") return "";
|
||||||
if(typeof(range) === "undefined") range = 8;
|
if(typeof(range) === "undefined") range = 8;
|
||||||
return address.substring(0, range) + "..." + address.substring(address.length-range);
|
return address.substring(0, range) + "..." + address.substring(address.length-range);
|
||||||
}
|
}
|
||||||
|
|
||||||
function addressTruncatePretty(address, blocks){
|
function addressTruncatePretty(address, blocks){
|
||||||
if(typeof(address) === "undefined") return;
|
if(typeof(address) === "undefined") return "";
|
||||||
if(typeof(blocks) === "undefined") blocks = 2;
|
if(typeof(blocks) === "undefined") blocks = 2;
|
||||||
blocks = blocks <= 1 ? 1 : blocks >= 23 ? 23 : blocks;
|
blocks = blocks <= 1 ? 1 : blocks >= 23 ? 23 : blocks;
|
||||||
var ret = "";
|
var ret = "";
|
||||||
|
|
|
@ -116,11 +116,11 @@ Rectangle {
|
||||||
|
|
||||||
MoneroComponents.LineEdit {
|
MoneroComponents.LineEdit {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
id: walletCreationHeight
|
||||||
readOnly: true
|
readOnly: true
|
||||||
copyButton: true
|
copyButton: true
|
||||||
labelText: qsTr("Block #") + translationManager.emptyString
|
labelText: qsTr("Block #") + translationManager.emptyString
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
text: currentWallet.walletCreationHeight
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,6 +261,7 @@ Rectangle {
|
||||||
function onPageCompleted() {
|
function onPageCompleted() {
|
||||||
console.log("keys page loaded");
|
console.log("keys page loaded");
|
||||||
|
|
||||||
|
walletCreationHeight.text = currentWallet.walletCreationHeight
|
||||||
secretViewKey.text = currentWallet.secretViewKey
|
secretViewKey.text = currentWallet.secretViewKey
|
||||||
publicViewKey.text = currentWallet.publicViewKey
|
publicViewKey.text = currentWallet.publicViewKey
|
||||||
secretSpendKey.text = (!currentWallet.viewOnly) ? currentWallet.secretSpendKey : ""
|
secretSpendKey.text = (!currentWallet.viewOnly) ? currentWallet.secretSpendKey : ""
|
||||||
|
|
|
@ -151,7 +151,7 @@ Rectangle {
|
||||||
labelFontSize: 14
|
labelFontSize: 14
|
||||||
copyButton: false
|
copyButton: false
|
||||||
readOnly: true
|
readOnly: true
|
||||||
text: Utils.roundDownToNearestThousand(wizardController.m_wallet.walletCreationHeight)
|
text: Utils.roundDownToNearestThousand(wizardController.m_wallet ? wizardController.m_wallet.walletCreationHeight : 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.WarningBox {
|
MoneroComponents.WarningBox {
|
||||||
|
|
Loading…
Reference in a new issue