mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-28 01:16:50 +00:00
Support for commands.js file inside DApps
This commit is contained in:
parent
d6f43d3248
commit
eb15c0a4eb
@ -31,6 +31,7 @@ var TopLevel = {
|
|||||||
"create" : function () {},
|
"create" : function () {},
|
||||||
"createAccount" : function () {},
|
"createAccount" : function () {},
|
||||||
"data" : function () {},
|
"data" : function () {},
|
||||||
|
"DataSource" : function () {},
|
||||||
"Date" : function () {},
|
"Date" : function () {},
|
||||||
"DEBUG" : function () {},
|
"DEBUG" : function () {},
|
||||||
"decay" : function () {},
|
"decay" : function () {},
|
||||||
@ -97,6 +98,7 @@ var TopLevel = {
|
|||||||
"layout" : function () {},
|
"layout" : function () {},
|
||||||
"length" : function () {},
|
"length" : function () {},
|
||||||
"Linking" : function () {},
|
"Linking" : function () {},
|
||||||
|
"ListView" : function () {},
|
||||||
"locale" : function () {},
|
"locale" : function () {},
|
||||||
"lockToPortrait" : function () {},
|
"lockToPortrait" : function () {},
|
||||||
"log" : function () {},
|
"log" : function () {},
|
||||||
|
@ -28,24 +28,20 @@
|
|||||||
|
|
||||||
(defn fetch-commands!
|
(defn fetch-commands!
|
||||||
[_ [{:keys [whisper-identity dapp? dapp-url]}]]
|
[_ [{:keys [whisper-identity dapp? dapp-url]}]]
|
||||||
(when true
|
(cond
|
||||||
;-let [url (get-in db [:chats identity :dapp-url])]
|
(= console-chat-id whisper-identity)
|
||||||
(cond
|
(dispatch [::validate-hash whisper-identity js-res/console-js])
|
||||||
(= console-chat-id whisper-identity)
|
|
||||||
(dispatch [::validate-hash whisper-identity js-res/console-js])
|
|
||||||
|
|
||||||
(= wallet-chat-id whisper-identity)
|
(= wallet-chat-id whisper-identity)
|
||||||
(dispatch [::validate-hash whisper-identity js-res/wallet-js])
|
(dispatch [::validate-hash whisper-identity js-res/wallet-js])
|
||||||
|
|
||||||
(and dapp? dapp-url)
|
(and dapp? dapp-url)
|
||||||
(dispatch [::validate-hash whisper-identity js-res/dapp-js])
|
(http-get (s/join "/" [dapp-url commands-js])
|
||||||
|
#(dispatch [::validate-hash whisper-identity %])
|
||||||
|
#(dispatch [::validate-hash whisper-identity js-res/dapp-js]))
|
||||||
|
|
||||||
:else
|
:else
|
||||||
(dispatch [::validate-hash whisper-identity js-res/commands-js])
|
(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])))))
|
|
||||||
|
|
||||||
(defn dispatch-loaded!
|
(defn dispatch-loaded!
|
||||||
[db [identity file]]
|
[db [identity file]]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user