Separate testnet address prefix

This commit is contained in:
Zachary Michaels 2014-09-09 10:58:53 -04:00 committed by Riccardo Spagni
parent ee1bacc64f
commit d03308734b
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
21 changed files with 126 additions and 69 deletions

View file

@ -101,7 +101,7 @@ namespace tools
{
try
{
res.address = m_wallet.get_account().get_public_address_str();
res.address = m_wallet.get_account().get_public_address_str(m_wallet.testnet());
}
catch (std::exception& e)
{
@ -118,7 +118,7 @@ namespace tools
for (auto it = destinations.begin(); it != destinations.end(); it++)
{
cryptonote::tx_destination_entry de;
if(!get_account_address_from_str(de.addr, it->address))
if(!get_account_address_from_str(de.addr, m_wallet.testnet(), it->address))
{
er.code = WALLET_RPC_ERROR_CODE_WRONG_ADDRESS;
er.message = std::string("WALLET_RPC_ERROR_CODE_WRONG_ADDRESS: ") + it->address;