forked from Public/monero-gui
Wallet::daemonBlockChainHeight(); BC sync progress in GUI
This commit is contained in:
14
main.qml
14
main.qml
@@ -156,8 +156,12 @@ ApplicationWindow {
|
||||
currentWallet = wallet
|
||||
currentWallet.refreshed.connect(onWalletRefresh)
|
||||
currentWallet.updated.connect(onWalletUpdate)
|
||||
currentWallet.newBlock.connect(onWalletNewBlock)
|
||||
|
||||
console.log("initializing with daemon address: ", persistentSettings.daemon_address)
|
||||
|
||||
currentWallet.initAsync(persistentSettings.daemon_address, 0);
|
||||
|
||||
}
|
||||
|
||||
function walletPath() {
|
||||
@@ -219,6 +223,14 @@ ApplicationWindow {
|
||||
onWalletUpdate();
|
||||
}
|
||||
|
||||
function onWalletNewBlock(blockHeight) {
|
||||
if (splash.visible) {
|
||||
var progressText = qsTr("Synchronizing blocks %1/%2").arg(blockHeight.toFixed(0)).arg(currentWallet.daemonBlockChainHeight().toFixed(0));
|
||||
console.log("Progress text: " + progressText);
|
||||
splash.heightProgressText = progressText
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function walletsFound() {
|
||||
var wallets = walletManager.findWallets(moneroAccountsDir);
|
||||
@@ -418,7 +430,7 @@ ApplicationWindow {
|
||||
height: appWindow.height / 2
|
||||
x: (appWindow.width - width) / 2 + appWindow.x
|
||||
y: (appWindow.height - height) / 2 + appWindow.y
|
||||
message: qsTr("Please wait...")
|
||||
messageText: qsTr("Please wait...")
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user