diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index c0b2bc9bb..2dab4c6aa 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -144,10 +144,10 @@ void SendCoinsDialog::on_sendButton_clicked()
QString strFunds = "using anonymous funds";
QString strFee = "";
- recipients[0].inputType = "ONLY_DENOMINATED";
+ recipients[0].inputType = ONLY_DENOMINATED;
if(ui->checkUseDarksend->isChecked()) {
- recipients[0].inputType = "ONLY_DENOMINATED";
+ recipients[0].inputType = ONLY_DENOMINATED;
strFunds = "using anonymous funds";
QString strNearestAmount(
BitcoinUnits::formatWithUnit(
@@ -156,7 +156,7 @@ void SendCoinsDialog::on_sendButton_clicked()
"(darksend requires this amount to be rounded up to the nearest %1)."
).arg(strNearestAmount));
} else {
- recipients[0].inputType = "ALL_COINS";
+ recipients[0].inputType = ALL_COINS;
strFunds = "using any available funds (not recommended)";
}
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 40cbb906c..e260303b7 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -266,17 +266,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
CWalletTx *newTx = transaction.getTransaction();
CReserveKey *keyChange = transaction.getPossibleKeyChange();
-
- AvailableCoinsType act = ONLY_DENOMINATED;
- if(recipients[0].inputType == "ONLY_NONDENOMINATED"){
- act = ONLY_NONDENOMINATED;
- } else if(recipients[0].inputType == "ONLY_DENOMINATED"){
- act = ONLY_DENOMINATED;
- } else if(recipients[0].inputType == "ALL_COINS"){
- act = ALL_COINS;
- }
-
- bool fCreated = wallet->CreateTransaction(vecSend, *newTx, *keyChange, nFeeRequired, strFailReason, coinControl, act, recipients[0].useInstantX);
+ bool fCreated = wallet->CreateTransaction(vecSend, *newTx, *keyChange, nFeeRequired, strFailReason, coinControl, recipients[0].inputType, recipients[0].useInstantX);
transaction.setTransactionFee(nFeeRequired);
if(!fCreated)
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index 5a36855e0..90daee348 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -10,6 +10,7 @@
#include "allocators.h" /* for SecureString */
#include "instantx.h"
+#include "wallet.h"
#include