forked from Public/monero-gui
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33afd0bb83 | ||
|
|
a165a14519 | ||
|
|
33e1801c57 | ||
|
|
fac3fcb518 | ||
|
|
8457055f08 | ||
|
|
e01c847fde | ||
|
|
bedf04d08a | ||
|
|
83da709436 | ||
|
|
f51b0d7d0c | ||
|
|
1f9d60602a | ||
|
|
7a285b3613 | ||
|
|
6ee5effc15 | ||
|
|
954c972530 | ||
|
|
e5b0837c8e | ||
|
|
a73ae62526 | ||
|
|
44df1bccfc | ||
|
|
0a0dbf8853 | ||
|
|
b932df85fd | ||
|
|
79ee893499 | ||
|
|
1b2d940850 | ||
|
|
db4273ee82 | ||
|
|
05733c14b7 |
@@ -5,7 +5,7 @@ message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
||||
|
||||
set(VERSION_MAJOR "17")
|
||||
set(VERSION_MINOR "1")
|
||||
set(VERSION_REVISION "0")
|
||||
set(VERSION_REVISION "1")
|
||||
set(VERSION "0.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
|
||||
|
||||
option(STATIC "Link libraries statically, requires static Qt")
|
||||
|
||||
5
Makefile
5
Makefile
@@ -36,6 +36,11 @@ scanner:
|
||||
release:
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="x86-64" -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
||||
|
||||
release-linux-armv8:
|
||||
mkdir -p $(builddir)/release
|
||||
cd $(builddir)/release
|
||||
cmake -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="armv8-a" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="linux-armv8" $(topdir) && $(MAKE)
|
||||
|
||||
release-static:
|
||||
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release $(topdir) && $(MAKE)
|
||||
|
||||
|
||||
@@ -39,6 +39,15 @@ Rectangle {
|
||||
property var connected: Wallet.ConnectionStatus_Disconnected
|
||||
|
||||
function getConnectionStatusString(status) {
|
||||
switch (appWindow.daemonStartStopInProgress)
|
||||
{
|
||||
case 1:
|
||||
return qsTr("Starting the node");
|
||||
case 2:
|
||||
return qsTr("Stopping the node");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (status) {
|
||||
case Wallet.ConnectionStatus_Connected:
|
||||
if (!appWindow.daemonSynced)
|
||||
|
||||
@@ -17,7 +17,7 @@ if [ ! -d $MONERO_DIR/src ]; then
|
||||
fi
|
||||
git submodule update --remote
|
||||
git -C $MONERO_DIR fetch
|
||||
git -C $MONERO_DIR checkout v0.17.1.0
|
||||
git -C $MONERO_DIR checkout v0.17.1.1
|
||||
|
||||
# get monero core tag
|
||||
pushd $MONERO_DIR
|
||||
|
||||
29
main.qml
29
main.qml
@@ -72,7 +72,7 @@ ApplicationWindow {
|
||||
property bool walletSynced: false
|
||||
property int maxWindowHeight: (isAndroid || isIOS)? screenHeight : (screenHeight < 900)? 720 : 800;
|
||||
property bool daemonRunning: !persistentSettings.useRemoteNode && !disconnected
|
||||
property bool daemonStartStopInProgress: false
|
||||
property int daemonStartStopInProgress: 0
|
||||
property alias toolTip: toolTip
|
||||
property string walletName
|
||||
property bool viewOnly: false
|
||||
@@ -707,31 +707,33 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
function startDaemon(flags){
|
||||
daemonStartStopInProgress = true;
|
||||
daemonStartStopInProgress = 1;
|
||||
|
||||
// Pause refresh while starting daemon
|
||||
currentWallet.pauseRefresh();
|
||||
|
||||
appWindow.showProcessingSplash(qsTr("Waiting for daemon to start..."))
|
||||
const noSync = appWindow.walletMode === 0;
|
||||
const bootstrapNodeAddress = persistentSettings.walletMode < 2 ? "auto" : persistentSettings.bootstrapNodeAddress
|
||||
daemonManager.start(flags, persistentSettings.nettype, persistentSettings.blockchainDataDir, bootstrapNodeAddress, noSync);
|
||||
}
|
||||
|
||||
function stopDaemon(callback){
|
||||
daemonStartStopInProgress = true;
|
||||
appWindow.showProcessingSplash(qsTr("Waiting for daemon to stop..."))
|
||||
function stopDaemon(callback, splash){
|
||||
daemonStartStopInProgress = 2;
|
||||
if (splash) {
|
||||
appWindow.showProcessingSplash(qsTr("Waiting for daemon to stop..."));
|
||||
}
|
||||
daemonManager.stopAsync(persistentSettings.nettype, function(result) {
|
||||
daemonStartStopInProgress = false;
|
||||
hideProcessingSplash();
|
||||
daemonStartStopInProgress = 0;
|
||||
if (splash) {
|
||||
hideProcessingSplash();
|
||||
}
|
||||
callback(result);
|
||||
});
|
||||
}
|
||||
|
||||
function onDaemonStarted(){
|
||||
console.log("daemon started");
|
||||
daemonStartStopInProgress = false;
|
||||
hideProcessingSplash();
|
||||
daemonStartStopInProgress = 0;
|
||||
currentWallet.connected(true);
|
||||
// resume refresh
|
||||
currentWallet.startRefresh();
|
||||
@@ -744,8 +746,7 @@ ApplicationWindow {
|
||||
|
||||
function onDaemonStartFailure(error) {
|
||||
console.log("daemon start failed");
|
||||
daemonStartStopInProgress = false;
|
||||
hideProcessingSplash();
|
||||
daemonStartStopInProgress = 0;
|
||||
// resume refresh
|
||||
currentWallet.startRefresh();
|
||||
informationPopup.title = qsTr("Daemon failed to start") + translationManager.emptyString;
|
||||
@@ -1965,7 +1966,7 @@ ApplicationWindow {
|
||||
// Simple mode connection check timer
|
||||
id: simpleModeConnectionTimer
|
||||
interval: 2000
|
||||
running: appWindow.walletMode < 2 && currentWallet != undefined && !daemonStartStopInProgress
|
||||
running: appWindow.walletMode < 2 && currentWallet != undefined && daemonStartStopInProgress == 0
|
||||
repeat: true
|
||||
onTriggered: appWindow.checkSimpleModeConnection()
|
||||
}
|
||||
@@ -2043,7 +2044,7 @@ ApplicationWindow {
|
||||
if(daemonManager == undefined || persistentSettings.useRemoteNode) {
|
||||
closeAccepted();
|
||||
} else if (appWindow.walletMode == 0) {
|
||||
stopDaemon(closeAccepted);
|
||||
stopDaemon(closeAccepted, true);
|
||||
} else {
|
||||
showProcessingSplash(qsTr("Checking local node status..."));
|
||||
const handler = function(running) {
|
||||
|
||||
2
monero
2
monero
Submodule monero updated: 4d855fcca7...76cc82c292
@@ -764,12 +764,18 @@ Rectangle {
|
||||
font.pixelSize: 15
|
||||
text: {
|
||||
if (isout) {
|
||||
if (isFailed) {
|
||||
return qsTr("Failed") + translationManager.emptyString;
|
||||
}
|
||||
if (isPending) {
|
||||
return qsTr("Waiting confirmation...") + translationManager.emptyString;
|
||||
}
|
||||
if (address) {
|
||||
const addressBookName = currentWallet ? currentWallet.addressBook.getDescription(address) : null;
|
||||
return (addressBookName ? FontAwesome.addressBook + " " + addressBookName : TxUtils.addressTruncate(address, 8));
|
||||
}
|
||||
if (amount != 0) {
|
||||
return (blockheight ? qsTr("Unknown recipient") : qsTr("Waiting confirmation...")) + translationManager.emptyString;
|
||||
return qsTr("Unknown recipient") + translationManager.emptyString;
|
||||
} else {
|
||||
return qsTr("My wallet") + translationManager.emptyString;
|
||||
}
|
||||
@@ -1489,6 +1495,8 @@ Rectangle {
|
||||
|
||||
for (var i = 0; i < count; ++i) {
|
||||
var idx = _model.index(i, 0);
|
||||
var isPending = model.data(idx, TransactionHistoryModel.TransactionPendingRole);
|
||||
var isFailed = model.data(idx, TransactionHistoryModel.TransactionFailedRole);
|
||||
var isout = _model.data(idx, TransactionHistoryModel.TransactionIsOutRole);
|
||||
var amount = _model.data(idx, TransactionHistoryModel.TransactionAmountRole);
|
||||
var hash = _model.data(idx, TransactionHistoryModel.TransactionHashRole);
|
||||
@@ -1525,6 +1533,8 @@ Rectangle {
|
||||
|
||||
root.txModelData.push({
|
||||
"i": i,
|
||||
"isPending": isPending,
|
||||
"isFailed": isFailed,
|
||||
"isout": isout,
|
||||
"amount": amount,
|
||||
"displayAmount": displayAmount,
|
||||
|
||||
@@ -553,7 +553,8 @@ Rectangle {
|
||||
if (appWindow.viewOnly && !appWindow.isTrustedDaemon()){
|
||||
errorMessage = "<p class='orange'>" + qsTr("* To import, you must connect to a local node or a trusted remote node") + "</p>";
|
||||
}
|
||||
return "<style type='text/css'>p{line-height:20px; margin-top:0px; margin-bottom:0px; color:#ffffff;} p.orange{color:#ff9323;}</style>" +
|
||||
return "<style type='text/css'>p{line-height:20px; margin-top:0px; margin-bottom:0px; color:" + MoneroComponents.Style.defaultFontColor +
|
||||
";} p.orange{color:#ff9323;}</style>" +
|
||||
"<p>" + qsTr("1. Using cold wallet, export the key images into a file") + "</p>" +
|
||||
"<p>" + qsTr("2. Using view-only wallet, import the key images file") + "</p>" +
|
||||
errorMessage + translationManager.emptyString
|
||||
@@ -593,7 +594,8 @@ Rectangle {
|
||||
if (appWindow.viewOnly && !pageRoot.checkInformation(amountLine.text, addressLine.text, appWindow.persistentSettings.nettype)){
|
||||
errorMessage = "<p class='orange'>" + qsTr("* To create a transaction file, please enter address and amount above") + "</p>";
|
||||
}
|
||||
return "<style type='text/css'>p{line-height:20px; margin-top:0px; margin-bottom:0px; color:#ffffff;} p.orange{color:#ff9323;}</style>" +
|
||||
return "<style type='text/css'>p{line-height:20px; margin-top:0px; margin-bottom:0px; color:" + MoneroComponents.Style.defaultFontColor +
|
||||
";} p.orange{color:#ff9323;}</style>" +
|
||||
"<p>" + qsTr("1. Using view-only wallet, export the outputs into a file") + "</p>" +
|
||||
"<p>" + qsTr("2. Using cold wallet, import the outputs file and export the key images") + "</p>" +
|
||||
"<p>" + qsTr("3. Using view-only wallet, import the key images file and create a transaction file") + "</p>" +
|
||||
|
||||
@@ -136,6 +136,7 @@ Rectangle{
|
||||
MouseArea {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
enabled: persistentSettings.useRemoteNode
|
||||
onClicked: {
|
||||
persistentSettings.useRemoteNode = false;
|
||||
appWindow.disconnectRemoteNode();
|
||||
@@ -227,6 +228,7 @@ Rectangle{
|
||||
MouseArea {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
anchors.fill: parent
|
||||
enabled: !persistentSettings.useRemoteNode
|
||||
onClicked: {
|
||||
appWindow.connectRemoteNode();
|
||||
}
|
||||
|
||||
@@ -178,5 +178,5 @@ add_custom_command(TARGET monero-wallet-gui POST_BUILD COMMAND ${CMAKE_COMMAND}
|
||||
include(Deploy)
|
||||
|
||||
install(TARGETS monero-wallet-gui
|
||||
DESTINATION ${CMAKE_INSTALL_PREFIX}
|
||||
DESTINATION bin
|
||||
)
|
||||
|
||||
@@ -112,6 +112,10 @@ bool DaemonManager::start(const QString &flags, NetworkType::Type nettype, const
|
||||
arguments << "--no-sync";
|
||||
}
|
||||
|
||||
if (!flags.contains("--out-peers", Qt::CaseSensitive) && bootstrapNodeAddress == "auto") {
|
||||
arguments << "--out-peers" << "16";
|
||||
}
|
||||
|
||||
arguments << "--check-updates" << "disabled";
|
||||
|
||||
// --max-concurrency based on threads available.
|
||||
|
||||
@@ -1086,6 +1086,8 @@ Wallet::~Wallet()
|
||||
{
|
||||
qDebug("~Wallet: Closing wallet");
|
||||
|
||||
pauseRefresh();
|
||||
m_walletImpl->stop();
|
||||
m_scheduler.shutdownWaitForFinished();
|
||||
|
||||
delete m_addressBook;
|
||||
@@ -1116,8 +1118,8 @@ Wallet::~Wallet()
|
||||
void Wallet::startRefreshThread()
|
||||
{
|
||||
const auto future = m_scheduler.run([this] {
|
||||
static constexpr const size_t refreshIntervalSec = 10;
|
||||
static constexpr const size_t intervalResolutionMs = 100;
|
||||
constexpr const std::chrono::seconds refreshInterval{10};
|
||||
constexpr const std::chrono::milliseconds intervalResolution{100};
|
||||
|
||||
auto last = std::chrono::steady_clock::now();
|
||||
while (!m_scheduler.stopping())
|
||||
@@ -1125,15 +1127,15 @@ void Wallet::startRefreshThread()
|
||||
if (m_refreshEnabled)
|
||||
{
|
||||
const auto now = std::chrono::steady_clock::now();
|
||||
const auto elapsed = std::chrono::duration_cast<std::chrono::seconds>(now - last).count();
|
||||
if (elapsed >= refreshIntervalSec)
|
||||
const auto elapsed = now - last;
|
||||
if (elapsed >= refreshInterval)
|
||||
{
|
||||
refresh(false);
|
||||
last = std::chrono::steady_clock::now();
|
||||
}
|
||||
}
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(intervalResolutionMs));
|
||||
std::this_thread::sleep_for(intervalResolution);
|
||||
}
|
||||
});
|
||||
if (!future.first)
|
||||
|
||||
@@ -48,8 +48,7 @@ Rectangle {
|
||||
|
||||
var valid = false;
|
||||
if(wizardController.walletRestoreMode === "keys") {
|
||||
valid = wizardRestoreWallet1.verifyFromKeys();
|
||||
return valid;
|
||||
return wizardWalletInput.verify() && wizardRestoreWallet1.verifyFromKeys();
|
||||
} else if(wizardController.walletRestoreMode === "seed") {
|
||||
valid = wizardWalletInput.verify();
|
||||
if(!valid) return false;
|
||||
|
||||
Reference in New Issue
Block a user