moontreeapp / moontree

Primary Mono Repo
6 stars 5 forks source link

importing 1 wallet and switch it shows bad values #598

Closed lastmeta closed 2 years ago

lastmeta commented 2 years ago

Describe The Bug

while importing 1 wallet, if switch to another wallet, and it shows all values for both wallets.

To Reproduce

import double tap name

Expected Behavior

show other wallet.

lastmeta commented 2 years ago

in the name of optimization we moved away from keeping with our strict data model, which was my mistake, this bug shows we must return to it since it solves for this kind of thing.

see #517 we are treating balances and unspents as temporary rather than saving them to the database by wallet. I think saving them by wallet and doing the extra computation to query them by wallet will solve this issue

lastmeta commented 2 years ago

we don't need to save the cache as a list and would not run into this issue if we saved it as a set

[7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 26]