Refactor delete account algorithm to properly remove deleted account

Prior to this commit, deleted accounts would stay in the database but
set to `nil`. With this change accounts are properly removed from the database
when scheduled for deletion.

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
Pascal Precht 2020-04-17 12:49:06 +02:00 committed by Andrey Shovkoplyas
parent 5002b4c7bb
commit f280d5a90e
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4

View File

@ -274,7 +274,7 @@
:on-success #()}]
:db (-> db
(assoc :multiaccount/accounts new-accounts)
(assoc-in [:wallet :accounts deleted-address] nil))}
(update-in [:wallet :accounts] dissoc deleted-address))}
(navigation/navigate-to-cofx :wallet nil))))
(fx/defn view-only-qr-scanner-result