getAccountData returns the right addresses and the right total balance for the given seed.
However, if you check the balance of each address, each of them will be 0.
The reason is that getBalancesAndFormat does not update the input addresses returned by getNewAddresses, but returns a copy of these addresses.
I limited the change to just getAccountData to avoid any possible side effect, and we can take more time to decide whether we can improve the current design of this part.
I added some test cases. I could not run them locally as I have some issues to build IRI on my computer right now. If it does not pass on Travis and I could not fix the IRI install on my side, I will switch to my previous computer.
This aims to fix #316.
getAccountData returns the right addresses and the right total balance for the given seed. However, if you check the balance of each address, each of them will be 0.
The reason is that getBalancesAndFormat does not update the input addresses returned by getNewAddresses, but returns a copy of these addresses.
I limited the change to just getAccountData to avoid any possible side effect, and we can take more time to decide whether we can improve the current design of this part.
I added some test cases. I could not run them locally as I have some issues to build IRI on my computer right now. If it does not pass on Travis and I could not fix the IRI install on my side, I will switch to my previous computer.