Open NReilingh opened 7 years ago
Upon further reflection, this could be a bigger issue — I can't remove ANY addresses from the maidsafecoin asset list now that I removed the "address" value, but the addresses listed under the maidsafecoin asset still have the padlock icon indicating the private key is still accessible to the application, and there is no way to remove it. That's not good.
More testing and information: after trying with a fresh browser, the "duplicate" addresses and sums are gone. So it's a browser code issue that's not affecting persistence. Still pretty annoying.
Thanks for the report NReilingh, we'll look into trying to duplicate and figure out why this is happening.
Same happens if you import an address multiple times - the address is listed once per import and the wallet balance is multiplied by the number of times you import (ie it totals every duplicate address).
If I create a new address in order to be able to delete the imported address (as it was the last one) and then import it again it just adds another duplicate, so it remembers the earlier imports even after deleting the address.
I created a new address in Omniwallet, and may have tried to add the same address as a "watch only" address — I can't recall exactly what I did. But after I sent some MAID to this address and the transaction was confirmed, the address was duplicated under the MAID asset.
Under the Addresses list, the one address is shown and calculated correctly, but switching to "View by Assets", the same address appears multiple times under the MaidSafeCoin asset. On this page and on the overview, the asset value is summed up for all of the duplicates. Removing the address appears to remove it from the other views, but ends up not actually affecting the MaidSafeCoin asset view.
I am not equipped to go through your codebase, but this could be treated as a database schema problem — wherever you are storing your state is not rejecting duplicate address-per-wallet values. If your database is non-relational maybe you need to do this on the application layer instead.
I have already backed up my address primary key, so I am going to just trash my old wallet and create a new one to avoid seeing the doubly- (and now triply- and quadruply- after removing and re-importing my private key) summed values.