BitBoxSwiss / bitbox-wallet-app

The BitBoxApp for desktop and mobile.
https://bitbox.swiss/app
Apache License 2.0
251 stars 82 forks source link

backend/account: migrate legacy notes upfront #2729

Closed benma closed 2 months ago

benma commented 3 months ago

In the past we had different account IDs, and the notes where stored in different files. To deal with this, we used a list of notes objects per account to be able to fetch notes from all files.

This commit changes this to migrate/merge legacy note files so we only have one notes file per account. This is conceptually easier and simplifies the upcoming notes export feature.

This also fixes a bug where the rates updater event is not propagated for accounts with account number > 0 - Initialize() returned early with return nil in that case.