diff options
| author | moneromooo.monero <moneromooo.monero@users.noreply.github.com> | 2016-11-09 13:00:43 +0000 |
|---|---|---|
| committer | moneromooo.monero <moneromooo.monero@users.noreply.github.com> | 2016-11-12 19:24:13 +0000 |
| commit | c779b376fc06c1912b896549b5f39c4a6ef0ec5a (patch) | |
| tree | 3ab548d3e931a5db6e88de6897105584773f686c /main.qml | |
| parent | 2143392b84e089319decee65e63c2376e6fdffd4 (diff) | |
| download | monzero-gui-c779b376fc06c1912b896549b5f39c4a6ef0ec5a.tar.gz monzero-gui-c779b376fc06c1912b896549b5f39c4a6ef0ec5a.tar.xz monzero-gui-c779b376fc06c1912b896549b5f39c4a6ef0ec5a.zip | |
Support for sweeping all outputs
Diffstat (limited to 'main.qml')
| -rw-r--r-- | main.qml | 51 |
1 files changed, 28 insertions, 23 deletions
@@ -423,33 +423,38 @@ ApplicationWindow { transactionDescription = description; // validate amount; - var amountxmr = walletManager.amountFromString(amount); - console.log("integer amount: ", amountxmr); - console.log("integer unlocked",currentWallet.unlockedBalance) - if (amountxmr <= 0) { - informationPopup.title = qsTr("Error") + translationManager.emptyString; - informationPopup.text = qsTr("Amount is wrong: expected number from %1 to %2") - .arg(walletManager.displayAmount(0)) - .arg(walletManager.maximumAllowedAmountAsSting()) - + translationManager.emptyString + if (amount !== "(all)") { + var amountxmr = walletManager.amountFromString(amount); + console.log("integer amount: ", amountxmr); + console.log("integer unlocked",currentWallet.unlockedBalance) + if (amountxmr <= 0) { + informationPopup.title = qsTr("Error") + translationManager.emptyString; + informationPopup.text = qsTr("Amount is wrong: expected number from %1 to %2") + .arg(walletManager.displayAmount(0)) + .arg(walletManager.maximumAllowedAmountAsSting()) + + translationManager.emptyString - informationPopup.icon = StandardIcon.Critical - informationPopup.onCloseCallback = null - informationPopup.open() - return; - } else if (amountxmr > currentWallet.unlockedBalance) { - informationPopup.title = qsTr("Error") + translationManager.emptyString; - informationPopup.text = qsTr("insufficient funds. Unlocked balance: %1") - .arg(walletManager.displayAmount(currentWallet.unlockedBalance)) - + translationManager.emptyString + informationPopup.icon = StandardIcon.Critical + informationPopup.onCloseCallback = null + informationPopup.open() + return; + } else if (amountxmr > currentWallet.unlockedBalance) { + informationPopup.title = qsTr("Error") + translationManager.emptyString; + informationPopup.text = qsTr("insufficient funds. Unlocked balance: %1") + .arg(walletManager.displayAmount(currentWallet.unlockedBalance)) + + translationManager.emptyString - informationPopup.icon = StandardIcon.Critical - informationPopup.onCloseCallback = null - informationPopup.open() - return; + informationPopup.icon = StandardIcon.Critical + informationPopup.onCloseCallback = null + informationPopup.open() + return; + } } - currentWallet.createTransactionAsync(address, paymentId, amountxmr, mixinCount, priority); + if (amount === "(all)") + currentWallet.createTransactionAllAsync(address, paymentId, amountxmr, mixinCount, priority); + else + currentWallet.createTransactionAsync(address, paymentId, amountxmr, mixinCount, priority); } function handleSweepUnmixable() { |
