diff options
| author | Jacob Brydolf <jacob@brydolf.net> | 2016-10-11 23:02:21 +0200 |
|---|---|---|
| committer | Jacob Brydolf <jacob@brydolf.net> | 2016-10-11 23:02:21 +0200 |
| commit | 2d980b6951088c46ac097944a73c836fdb6e70b6 (patch) | |
| tree | afb639de70fd0a327d585d07a7907804fd735a63 | |
| parent | 6a386a42fc71f56cd09bb25a715c826cf0270314 (diff) | |
| download | monzero-gui-2d980b6951088c46ac097944a73c836fdb6e70b6.tar.gz monzero-gui-2d980b6951088c46ac097944a73c836fdb6e70b6.tar.xz monzero-gui-2d980b6951088c46ac097944a73c836fdb6e70b6.zip | |
validation on send - unlocked balance
| -rw-r--r-- | main.qml | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -326,6 +326,7 @@ ApplicationWindow { // 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") @@ -337,6 +338,16 @@ ApplicationWindow { 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; } // validate address; |
