aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletmodel.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-07-26 15:38:31 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-07-26 16:47:23 +0200
commit491ad6db507776054c38230387f384991f42ad29 (patch)
tree7d708a59cb5f61f9d970950c528889dec8fde8d5 /src/qt/walletmodel.cpp
parentc0b892fee89cba7d1fda5fda2d2fc7e966643be1 (diff)
parenta9ba47101a46533ff0418d6868ebc9bf5c889818 (diff)
downloadbitcoin-491ad6db507776054c38230387f384991f42ad29.tar.xz
Merge remote branch 'upstream/master'
Conflicts: src/bitcoinrpc.cpp
Diffstat (limited to 'src/qt/walletmodel.cpp')
-rw-r--r--src/qt/walletmodel.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 4ff2e0ab15..732472c1a9 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -66,9 +66,8 @@ void WalletModel::update()
bool WalletModel::validateAddress(const QString &address)
{
- uint160 hash160 = 0;
-
- return AddressToHash160(address.toStdString(), hash160);
+ CBitcoinAddress addressParsed(address.toStdString());
+ return addressParsed.IsValid();
}
WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipient> &recipients)
@@ -87,7 +86,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipie
{
uint160 hash160 = 0;
- if(!AddressToHash160(rcp.address.toUtf8().constData(), hash160))
+ if(!validateAddress(rcp.address))
{
return InvalidAddress;
}