diff --git a/externs/externs.js b/externs/externs.js index fe90dc972e..15840b4130 100644 --- a/externs/externs.js +++ b/externs/externs.js @@ -31,6 +31,7 @@ var TopLevel = { "create" : function () {}, "createAccount" : function () {}, "data" : function () {}, +"DataSource" : function () {}, "Date" : function () {}, "DEBUG" : function () {}, "decay" : function () {}, @@ -97,6 +98,7 @@ var TopLevel = { "layout" : function () {}, "length" : function () {}, "Linking" : function () {}, +"ListView" : function () {}, "locale" : function () {}, "lockToPortrait" : function () {}, "log" : function () {}, diff --git a/src/status_im/commands/handlers/loading.cljs b/src/status_im/commands/handlers/loading.cljs index 533e7bfc8c..71d5b1ca0a 100644 --- a/src/status_im/commands/handlers/loading.cljs +++ b/src/status_im/commands/handlers/loading.cljs @@ -28,24 +28,20 @@ (defn fetch-commands! [_ [{:keys [whisper-identity dapp? dapp-url]}]] - (when true - ;-let [url (get-in db [:chats identity :dapp-url])] - (cond - (= console-chat-id whisper-identity) - (dispatch [::validate-hash whisper-identity js-res/console-js]) + (cond + (= console-chat-id whisper-identity) + (dispatch [::validate-hash whisper-identity js-res/console-js]) - (= wallet-chat-id whisper-identity) - (dispatch [::validate-hash whisper-identity js-res/wallet-js]) + (= wallet-chat-id whisper-identity) + (dispatch [::validate-hash whisper-identity js-res/wallet-js]) - (and dapp? dapp-url) - (dispatch [::validate-hash whisper-identity js-res/dapp-js]) + (and dapp? dapp-url) + (http-get (s/join "/" [dapp-url commands-js]) + #(dispatch [::validate-hash whisper-identity %]) + #(dispatch [::validate-hash whisper-identity js-res/dapp-js])) - :else - (dispatch [::validate-hash whisper-identity js-res/commands-js]) - #_(http-get (s/join "/" [url commands-js]) - - #(dispatch [::validate-hash identity %]) - #(dispatch [::loading-failed! identity ::file-was-not-found]))))) + :else + (dispatch [::validate-hash whisper-identity js-res/commands-js]))) (defn dispatch-loaded! [db [identity file]]