hide old wallet Dapp #2021

This commit is contained in:
Andrey Shovkoplyas 2017-10-11 18:10:06 +03:00 committed by Roman Volosovskyi
parent e17d3bc05e
commit 8269d6d9a9
4 changed files with 13 additions and 13 deletions

View File

@ -33,14 +33,8 @@
"ru": "Кошелек" "ru": "Кошелек"
}, },
"photo-path": "icon_wallet_avatar", "photo-path": "icon_wallet_avatar",
"add-chat?": true,
"dapp?": true, "dapp?": true,
"groups": ["dapps"],
"has-global-command?": true, "has-global-command?": true,
"dapp-url":
{
"en": "https://status.im/dapps/wallet/"
},
"bot-url": "local://wallet-bot", "bot-url": "local://wallet-bot",
"unremovable?": true "unremovable?": true
}, },

View File

@ -180,11 +180,13 @@
(let [chats (->> all-stored-chats (let [chats (->> all-stored-chats
(map (fn [{:keys [chat-id] :as chat}] (map (fn [{:keys [chat-id] :as chat}]
[chat-id (assoc chat :last-message (get-last-stored-message chat-id))])) [chat-id (assoc chat :last-message (get-last-stored-message chat-id))]))
(into {}))] (into {}))
;;TODO temporary hide wallet chat, this code should be deleted after wallet contact will be deleted
chats' (dissoc chats "wallet")]
(-> new-db (-> new-db
(assoc-in [:message-data :preview] message-previews) (assoc-in [:message-data :preview] message-previews)
(assoc :handler-data (handler-data/get-all)) (assoc :handler-data (handler-data/get-all))
(assoc :chats chats) (assoc :chats chats')
(init-console-chat true) (init-console-chat true)
(update :dispatch-n conj event))))))) (update :dispatch-n conj event)))))))

View File

@ -278,10 +278,14 @@
(assoc :bot id (assoc :bot id
:type :command))])) :type :command))]))
(into {})) (into {}))
contacts (into {} contacts-list)] contacts (into {} contacts-list)
{:db (assoc db :contacts/contacts contacts ;;TODO temporary hide wallet contact, this code should be deleted after wallet contact will be deleted
contacts' (if (get-in contacts "wallet")
(assoc-in contacts ["wallet" :pending?] true)
contacts)]
{:db (assoc db :contacts/contacts contacts'
:global-commands global-commands) :global-commands global-commands)
:dispatch-n (mapv (fn [_ contact] [:watch-contact contact]) contacts)}))) :dispatch-n (mapv (fn [_ contact] [:watch-contact contact]) contacts')})))
(defn add-contacts (defn add-contacts
"Creates effects map for adding contacts" "Creates effects map for adding contacts"

View File

@ -123,13 +123,13 @@
{:address nil {:address nil
:name "Wallet" :name "Wallet"
:global-command nil :global-command nil
:dapp-url "https://status.im/dapps/wallet/"
:dapp-hash nil :dapp-hash nil
:photo-path "icon_wallet_avatar" :photo-path "icon_wallet_avatar"
:dapp-url nil
:bot-url nil :bot-url nil
:pending? false
:whisper-identity "wallet" :whisper-identity "wallet"
:dapp? true :dapp? true
:pending? false
:unremovable? true :unremovable? true
:public-key nil}) :public-key nil})