aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-11-22 16:20:11 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-11-22 16:20:11 +0000
commitc0ae52c0810963dd678adf6a948d396223c92379 (patch)
tree1a9cb2fb709982f460f5f779dafcb2861165789f /src/simplewallet
parentMerge pull request #2783 (diff)
downloadmonero-c0ae52c0810963dd678adf6a948d396223c92379.tar.xz
simplewallet: prevent (wrong) integrated adresses on accounts > 0
Diffstat (limited to 'src/simplewallet')
-rw-r--r--src/simplewallet/simplewallet.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index d971f4fed..d0cf4676c 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -4785,6 +4785,11 @@ bool simple_wallet::print_integrated_address(const std::vector<std::string> &arg
}
if (args.size() == 0)
{
+ if (m_current_subaddress_account != 0)
+ {
+ fail_msg_writer() << tr("Integrated addresses can only be created for account 0");
+ return true;
+ }
payment_id = crypto::rand<crypto::hash8>();
success_msg_writer() << tr("Random payment ID: ") << payment_id;
success_msg_writer() << tr("Matching integrated address: ") << m_wallet->get_account().get_public_integrated_address_str(payment_id, m_wallet->testnet());
@@ -4792,6 +4797,11 @@ bool simple_wallet::print_integrated_address(const std::vector<std::string> &arg
}
if(tools::wallet2::parse_short_payment_id(args.back(), payment_id))
{
+ if (m_current_subaddress_account != 0)
+ {
+ fail_msg_writer() << tr("Integrated addresses can only be created for account 0");
+ return true;
+ }
success_msg_writer() << m_wallet->get_account().get_public_integrated_address_str(payment_id, m_wallet->testnet());
return true;
}