From 8b2fa695af3ce5c352e88575f105a6709dec95cc Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Wed, 25 Oct 2017 11:18:12 +0200 Subject: [PATCH] fix wallet contact migration --- src/status_im/data_store/realm/schemas/account/v16/core.cljs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/status_im/data_store/realm/schemas/account/v16/core.cljs b/src/status_im/data_store/realm/schemas/account/v16/core.cljs index 1ffd365d6c..9a933e2183 100644 --- a/src/status_im/data_store/realm/schemas/account/v16/core.cljs +++ b/src/status_im/data_store/realm/schemas/account/v16/core.cljs @@ -64,7 +64,10 @@ (log/debug "migrating v16 account database: " old-realm new-realm) (when-let [wallet-chat (chat-by-id new-realm "wallet")] (.delete new-realm wallet-chat)) - (when-let [wallet-contact (chat-by-id new-realm "wallet")] + (when-let [wallet-contact (some-> new-realm + (.objects "contact") + (.filtered (str "whisper-identity = \"wallet\"")) + (aget 0))] (.delete new-realm wallet-contact)) (migrate-commands new-realm "command-request") (migrate-commands new-realm "command"))