aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml7
-rw-r--r--CMakeLists.txt5
-rw-r--r--Makefile2
-rw-r--r--[-rwxr-xr-x]images/appicon.icnsbin71517 -> 104184 bytes
-rw-r--r--images/ledgerNanoSPlus.pngbin0 -> 31499 bytes
-rw-r--r--js/Windows.js3
-rw-r--r--js/Wizard.js4
-rw-r--r--main.qml23
-rw-r--r--pages/History.qml2
-rw-r--r--qml.qrc1
-rw-r--r--src/main/main.cpp4
-rw-r--r--wizard/WizardCreateDevice1.qml22
-rw-r--r--wizard/WizardModeSelection.qml29
13 files changed, 61 insertions, 41 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index af00f6b0..76a0b826 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -151,6 +151,13 @@ jobs:
- uses: actions/checkout@v1
with:
submodules: recursive
+ - uses: satackey/action-docker-layer-caching@v0.0.11
+ if: "!startsWith(github.ref, 'refs/tags/v')"
+ continue-on-error: true
+ with:
+ key: docker-android-static-{hash}
+ restore-keys: |
+ docker-android-static-
- name: prepare build environment
run: docker build --tag monero:build-env-android --build-arg THREADS=3 --file Dockerfile.android .
- name: build
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2d23d940..bc2f5f3d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,6 +13,7 @@ option(STATIC "Link libraries statically, requires static Qt")
option(USE_DEVICE_TREZOR "Trezor support compilation" ON)
option(WITH_SCANNER "Enable webcam QR scanner" OFF)
option(WITH_DESKTOP_ENTRY "Ask to install desktop entry on first startup" ON)
+option(WITH_UPDATER "Regularly check for new updates" ON)
option(DEV_MODE "Checkout latest monero master on build" OFF)
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
@@ -87,6 +88,10 @@ if(WITH_DESKTOP_ENTRY)
add_definitions(-DWITH_DESKTOP_ENTRY)
endif()
+if(WITH_UPDATER)
+ add_definitions(-DWITH_UPDATER)
+endif()
+
# Sodium
find_library(SODIUM_LIBRARY sodium)
message(STATUS "libsodium: libraries at ${SODIUM_LIBRARY}")
diff --git a/Makefile b/Makefile
index 42d218ff..7e855e89 100644
--- a/Makefile
+++ b/Makefile
@@ -61,7 +61,7 @@ debug-static-win64:
debug-static-mac64:
mkdir -p $(builddir)/debug
- cd $(builddir)/debug && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="mac-x64" $(topdir) && $(MAKE)
+ cd $(builddir)/debug && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="mac-x64" $(topdir) && $(MAKE)
release-static-win64:
mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE)
diff --git a/images/appicon.icns b/images/appicon.icns
index b87cae95..653ef570 100755..100644
--- a/images/appicon.icns
+++ b/images/appicon.icns
Binary files differ
diff --git a/images/ledgerNanoSPlus.png b/images/ledgerNanoSPlus.png
new file mode 100644
index 00000000..9e1dc61b
--- /dev/null
+++ b/images/ledgerNanoSPlus.png
Binary files differ
diff --git a/js/Windows.js b/js/Windows.js
index 6d067e0d..7475d6b0 100644
--- a/js/Windows.js
+++ b/js/Windows.js
@@ -1,4 +1,5 @@
-var flagsCustomDecorations = (Qt.FramelessWindowHint | Qt.CustomizeWindowHint | Qt.WindowSystemMenuHint | Qt.Window);
+var flagsCustomDecorationsBase = (Qt.FramelessWindowHint | Qt.CustomizeWindowHint | Qt.WindowSystemMenuHint | Qt.Window);
+var flagsCustomDecorations = isWindows ? (flagsCustomDecorationsBase | Qt.WindowMinimizeButtonHint) : flagsCustomDecorationsBase;
var flags = (Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint | Qt.WindowCloseButtonHint | Qt.WindowTitleHint | Qt.WindowMaximizeButtonHint | Qt.WindowFullscreenButtonHint);
/**
diff --git a/js/Wizard.js b/js/Wizard.js
index 76b41864..d47d1684 100644
--- a/js/Wizard.js
+++ b/js/Wizard.js
@@ -164,9 +164,9 @@ function getApproximateBlockchainHeight(_date, _nettype){
secondsPerBlock = secondsPerBlockV2;
}
- if(_nettype == "Testnet"){
+ if(_nettype == "Testnet" || _nettype == "Stagenet"){
// testnet got some huge rollbacks, so the estimation is way off
- var approximateTestnetRolledBackBlocks = 342100;
+ var approximateTestnetRolledBackBlocks = _nettype == "Testnet" ? 342100 : 30000;
if(approxBlockchainHeight > approximateTestnetRolledBackBlocks)
approxBlockchainHeight -= approximateTestnetRolledBackBlocks
}
diff --git a/main.qml b/main.qml
index 31450032..73026866 100644
--- a/main.qml
+++ b/main.qml
@@ -321,27 +321,6 @@ ApplicationWindow {
function connectWallet(wallet) {
currentWallet = wallet
- // TODO:
- // When the wallet variable is undefined, it yields a zero balance.
- // This can scare users, restart the GUI (as a quick fix).
- //
- // To reproduce, follow these steps:
- // 1) Open the GUI, load up a wallet that has a balance
- // 2) Settings -> close wallet
- // 3) Create a new wallet
- // 4) Settings -> close wallet
- // 5) Open the wallet from step 1
-
- if(!wallet || wallet === undefined || wallet.path === undefined){
- informationPopup.title = qsTr("Error") + translationManager.emptyString;
- informationPopup.text = qsTr("Couldn't open wallet: ") + 'please restart GUI.';
- informationPopup.icon = StandardIcon.Critical
- informationPopup.open()
- informationPopup.onCloseCallback = function() {
- appWindow.close();
- }
- }
-
walletName = usefulName(wallet.path)
viewOnly = currentWallet.viewOnly;
@@ -1001,7 +980,7 @@ ApplicationWindow {
// called on "getProof"
function handleGetProof(txid, address, message, amount) {
- if (amount.length > 0) {
+ if (amount !== null && amount.length > 0) {
var result = currentWallet.getReserveProof(false, currentWallet.currentSubaddressAccount, walletManager.amountFromString(amount), message)
txProofComputed(null, result)
} else {
diff --git a/pages/History.qml b/pages/History.qml
index efdf5931..48befeaa 100644
--- a/pages/History.qml
+++ b/pages/History.qml
@@ -1720,7 +1720,7 @@ Rectangle {
}
console.log("getProof: Generate clicked: txid " + hash + ", address " + address);
- middlePanel.getProofClicked(hash, address, '');
+ middlePanel.getProofClicked(hash, address, '', null);
informationPopup.title = qsTr("Payment proof") + translationManager.emptyString;
informationPopup.text = qsTr("Generating payment proof") + "..." + translationManager.emptyString;
informationPopup.onCloseCallback = null
diff --git a/qml.qrc b/qml.qrc
index 578729ec..ea698a4e 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -264,6 +264,7 @@
<file>components/SuccessfulTxDialog.qml</file>
<file>components/TxConfirmationDialog.qml</file>
<file>images/ledgerNanoS.png</file>
+ <file>images/ledgerNanoSPlus.png</file>
<file>images/ledgerNanoX.png</file>
<file>images/trezor.png</file>
<file>images/trezor@2x.png</file>
diff --git a/src/main/main.cpp b/src/main/main.cpp
index edb142f5..1e375843 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -505,7 +505,11 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
engine.rootContext()->setContextProperty("homePath", QDir::homePath());
engine.rootContext()->setContextProperty("applicationDirectory", QApplication::applicationDirPath());
engine.rootContext()->setContextProperty("idealThreadCount", QThread::idealThreadCount());
+#ifdef WITH_UPDATER
engine.rootContext()->setContextProperty("disableCheckUpdatesFlag", parser.isSet(disableCheckUpdatesOption));
+#else
+ engine.rootContext()->setContextProperty("disableCheckUpdatesFlag", true);
+#endif
engine.rootContext()->setContextProperty("socksProxyFlag", parser.value(socksProxyOption));
engine.rootContext()->setContextProperty("socksProxyFlagSet", parser.isSet(socksProxyOption));
diff --git a/wizard/WizardCreateDevice1.qml b/wizard/WizardCreateDevice1.qml
index 9c12c500..82971b88 100644
--- a/wizard/WizardCreateDevice1.qml
+++ b/wizard/WizardCreateDevice1.qml
@@ -52,6 +52,7 @@ Rectangle {
id: deviceNameModel
ListElement { column1: qsTr("Choose your hardware wallet"); column2: "";}
ListElement { column1: "Ledger Nano S"; column2: "Ledger";}
+ ListElement { column1: "Ledger Nano S Plus"; column2: "Ledger";}
ListElement { column1: "Ledger Nano X"; column2: "Ledger";}
ListElement { column1: "Trezor Model T"; column2: "Trezor";}
}
@@ -159,7 +160,20 @@ Rectangle {
Image {
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
- source: hardwareWalletType == "Trezor" ? "qrc:///images/trezor.png" : hardwareWalletType == "Ledger" ? (ledgerType == "Ledger Nano S" ? "qrc:///images/ledgerNanoS.png" : "qrc:///images/ledgerNanoX.png") : ""
+ source: {
+ if (hardwareWalletType == "Trezor") {
+ return "qrc:///images/trezor.png";
+ } else if (hardwareWalletType == "Ledger") {
+ if (ledgerType == "Ledger Nano S") {
+ return "qrc:///images/ledgerNanoS.png";
+ } else if (ledgerType == "Ledger Nano S Plus") {
+ return "qrc:///images/ledgerNanoSPlus.png";
+ } else if (ledgerType == "Ledger Nano X") {
+ return "qrc:///images/ledgerNanoX.png";
+ }
+ }
+ return "";
+ }
z: parent.z + 1
width: parent.width
height: 165
@@ -185,7 +199,7 @@ Rectangle {
validator: RegExpValidator {
regExp: /^(\d+|\d{4}-\d{2}-\d{2})$/
}
- text: "0"
+ text: "1"
}
CheckBox2 {
@@ -237,7 +251,7 @@ Rectangle {
wizardController.walletOptionsDeviceName = wizardCreateDevice1.deviceName;
if(lookahead.text)
wizardController.walletOptionsSubaddressLookahead = lookahead.text;
- if(restoreHeight.text){
+ if (restoreHeight.text && wizardController.walletOptionsDeviceIsRestore) {
wizardController.walletOptionsRestoreHeight = Utils.parseDateStringOrRestoreHeightAsInteger(restoreHeight.text);
}
@@ -259,7 +273,7 @@ Rectangle {
newDeviceWallet.checked = true;
restoreDeviceWallet.checked = false;
wizardController.walletOptionsDeviceIsRestore = false;
- restoreHeight.text = "";
+ restoreHeight.text = "1";
lookahead.text = "";
errorMsg.text = "";
}
diff --git a/wizard/WizardModeSelection.qml b/wizard/WizardModeSelection.qml
index 4d2fde53..5411735c 100644
--- a/wizard/WizardModeSelection.qml
+++ b/wizard/WizardModeSelection.qml
@@ -41,6 +41,7 @@ Rectangle {
property alias pageHeight: pageRoot.height
property string viewName: "wizardModeSelection1"
property bool portable: persistentSettings.portable
+ property bool simpleModeAvailable: !isTails && appWindow.persistentSettings.nettype == 0
function applyWalletMode(mode, wizardState) {
if (!persistentSettings.setPortable(portable)) {
@@ -76,21 +77,25 @@ Rectangle {
}
WizardMenuItem {
- opacity: appWindow.persistentSettings.nettype == 0 ? 1.0 : 0.5
+ opacity: simpleModeAvailable ? 1.0 : 0.5
Layout.topMargin: 20
headerText: qsTr("Simple mode") + translationManager.emptyString
bodyText: {
- if(appWindow.persistentSettings.nettype == 0){
- return qsTr("Easy access to sending, receiving and basic functionality.") + translationManager.emptyString;
+ if (isTails) {
+ return qsTr("Not available on Tails.") + translationManager.emptyString;
} else {
- return "Available on mainnet.";
+ if (appWindow.persistentSettings.nettype == 0) {
+ return qsTr("Easy access to sending, receiving and basic functionality.") + translationManager.emptyString;
+ } else {
+ return qsTr("Available on mainnet.") + translationManager.emptyString;
+ }
}
}
imageIcon: "qrc:///images/remote-node.png"
onMenuClicked: {
- if(appWindow.persistentSettings.nettype == 0){
+ if (simpleModeAvailable) {
applyWalletMode(0, 'wizardModeRemoteNodeWarning');
}
}
@@ -106,19 +111,23 @@ Rectangle {
}
WizardMenuItem {
- opacity: appWindow.persistentSettings.nettype == 0 ? 1.0 : 0.5
+ opacity: simpleModeAvailable ? 1.0 : 0.5
headerText: qsTr("Simple mode") + " (bootstrap)" + translationManager.emptyString
bodyText: {
- if(appWindow.persistentSettings.nettype == 0){
- return qsTr("Easy access to sending, receiving and basic functionality. The blockchain is downloaded to your computer.") + translationManager.emptyString;
+ if (isTails) {
+ return qsTr("Not available on Tails.") + translationManager.emptyString;
} else {
- return "Available on mainnet.";
+ if (appWindow.persistentSettings.nettype == 0) {
+ return qsTr("Easy access to sending, receiving and basic functionality. The blockchain is downloaded to your computer.") + translationManager.emptyString;
+ } else {
+ return qsTr("Available on mainnet.") + translationManager.emptyString;
+ }
}
}
imageIcon: "qrc:///images/local-node.png"
onMenuClicked: {
- if(appWindow.persistentSettings.nettype == 0){
+ if (simpleModeAvailable) {
appWindow.persistentSettings.pruneBlockchain = true;
applyWalletMode(1, 'wizardModeBootstrap');
}