diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-12-02 09:24:53 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-12-02 09:24:53 +0200 |
commit | 63f0031965f223a1ff4aea2abb4bb25496f49521 (patch) | |
tree | 979cbe6ad316fb06e068f9a952afa49c53a1cc63 /src/simplewallet | |
parent | Merge pull request #2852 (diff) | |
parent | simplewallet: prevent (wrong) integrated adresses on accounts > 0 (diff) | |
download | monero-63f0031965f223a1ff4aea2abb4bb25496f49521.tar.xz |
Merge pull request #2853
c0ae52c0 simplewallet: prevent (wrong) integrated adresses on accounts > 0 (moneromooo-monero)
Diffstat (limited to 'src/simplewallet')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 489733120..9a42f9547 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -5077,6 +5077,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()); @@ -5084,6 +5089,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; } |