diff options
Diffstat (limited to 'gui/src/clientmodel.cpp')
-rw-r--r-- | gui/src/clientmodel.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gui/src/clientmodel.cpp b/gui/src/clientmodel.cpp index 97b5f44fe7..7dcbc576a4 100644 --- a/gui/src/clientmodel.cpp +++ b/gui/src/clientmodel.cpp @@ -63,6 +63,17 @@ void ClientModel::update() emit numTransactionsChanged(getNumTransactions()); } +void ClientModel::setAddress(const QString &defaultAddress) +{ + uint160 hash160; + std::string strAddress = defaultAddress.toStdString(); + if (!AddressToHash160(strAddress, hash160)) + return; + if (!mapPubKeys.count(hash160)) + return; + CWalletDB().WriteDefaultKey(mapPubKeys[hash160]); +} + ClientModel::StatusCode ClientModel::sendCoins(const QString &payTo, qint64 payAmount) { uint160 hash160 = 0; |