diff --git a/bots/demo_bot/bot.js b/bots/demo_bot/bot.js
index 13d401898b..6653913c08 100644
--- a/bots/demo_bot/bot.js
+++ b/bots/demo_bot/bot.js
@@ -72,10 +72,13 @@ function superSuggestion(params, context) {
return {markup: view};
};
+var cnt = 0;
+
status.addListener("on-message-input-change", superSuggestion);
status.addListener("on-message-send", function (params, context) {
+ cnt++;
if (isNaN(params.message)) {
- return {"text-message": "Seems that you don't want to send money :("};
+ return {"text-message": "Seems that you don't want to send money :(. cnt = " + cnt};
}
var balance = web3.eth.getBalance(context.from);
diff --git a/ios/StatusIm.xcodeproj/xcshareddata/xcschemes/StatusIm.xcscheme b/ios/StatusIm.xcodeproj/xcshareddata/xcschemes/StatusIm.xcscheme
index 62f223716c..23d1068da0 100644
--- a/ios/StatusIm.xcodeproj/xcshareddata/xcschemes/StatusIm.xcscheme
+++ b/ios/StatusIm.xcodeproj/xcshareddata/xcschemes/StatusIm.xcscheme
@@ -99,6 +99,13 @@
ReferencedContainer = "container:StatusIm.xcodeproj">
+
+
+
+
diff --git a/modules/react-native-status/android/build.gradle b/modules/react-native-status/android/build.gradle
index 1bac8f8dcd..16403329fa 100644
--- a/modules/react-native-status/android/build.gradle
+++ b/modules/react-native-status/android/build.gradle
@@ -15,5 +15,5 @@ android {
dependencies {
compile 'com.facebook.react:react-native:+'
compile 'com.instabug.library:instabug:3+'
- compile(group: 'status-im', name: 'status-go', version: '0.9.8-g311f2b8', ext: 'aar')
+ compile(group: 'status-im', name: 'status-go', version: 'hackaton-alt-gd3704fa', ext: 'aar')
}
diff --git a/modules/react-native-status/ios/RCTStatus/RCTStatus.m b/modules/react-native-status/ios/RCTStatus/RCTStatus.m
index b6d42d514a..3c7484c144 100644
--- a/modules/react-native-status/ios/RCTStatus/RCTStatus.m
+++ b/modules/react-native-status/ios/RCTStatus/RCTStatus.m
@@ -202,7 +202,6 @@ RCT_EXPORT_METHOD(startNode:(RCTResponseSenderBlock)onResultCallback) {
NSLog(@"error %@", error);
}else
NSLog(@"folderName: %@", folderName);
-
char *configChars = GenerateConfig([folderName.path UTF8String], 3);
NSString *config = [NSString stringWithUTF8String: configChars];
NSData *configData = [config dataUsingEncoding:NSUTF8StringEncoding];
diff --git a/modules/react-native-status/ios/RCTStatus/pom.xml b/modules/react-native-status/ios/RCTStatus/pom.xml
index 59a7815451..17e0bd0d7e 100644
--- a/modules/react-native-status/ios/RCTStatus/pom.xml
+++ b/modules/react-native-status/ios/RCTStatus/pom.xml
@@ -25,7 +25,7 @@
status-im
status-go-ios-simulator
- 0.9.8-g311f2b8
+ hackaton-alt-gd3704fa
zip
true
./
diff --git a/src/status_im/chat/handlers/commands.cljs b/src/status_im/chat/handlers/commands.cljs
index 828e2c95ef..4a98fa87f9 100644
--- a/src/status_im/chat/handlers/commands.cljs
+++ b/src/status_im/chat/handlers/commands.cljs
@@ -34,7 +34,11 @@
result)]
(dispatch [:set-in [:message-data data-type message-id] result])
(when on-requested (on-requested result)))]
- (status/call-jail jail-id path params callback)))))))
+ ;chat-id path params callback lock? type
+ (status/call-jail {:jail-id jail-id
+ :path path
+ :params params
+ :callback callback})))))))
(handlers/register-handler :execute-command-immediately
(handlers/side-effect!
diff --git a/src/status_im/chat/handlers/input.cljs b/src/status_im/chat/handlers/input.cljs
index e80af6744c..0f682526bb 100644
--- a/src/status_im/chat/handlers/input.cljs
+++ b/src/status_im/chat/handlers/input.cljs
@@ -128,14 +128,15 @@
params {:parameters {:args args}
:context (merge {:data data}
(input-model/command-dependent-context-params command))}]
- (status/call-jail jail-id
- path
- params
- #(dispatch [:received-bot-response
- {:chat-id current-chat-id
- :command command
- :parameter-index parameter-index}
- %]))))))))
+ (status/call-jail
+ {:jail-id jail-id
+ :path path
+ :params params
+ :callback #(dispatch [:received-bot-response
+ {:chat-id current-chat-id
+ :command command
+ :parameter-index parameter-index}
+ %])})))))))
(handlers/register-handler
::send-message
diff --git a/src/status_im/chat/handlers/send_message.cljs b/src/status_im/chat/handlers/send_message.cljs
index c02207377b..75f7f0ca6e 100644
--- a/src/status_im/chat/handlers/send_message.cljs
+++ b/src/status_im/chat/handlers/send_message.cljs
@@ -143,11 +143,11 @@
[:check-and-load-commands!
identity
#(status/call-jail
- identity
- path
- params
- (fn [res]
- (dispatch [:command-handler! chat-id parameters res])))])))))
+ {:jail-id identity
+ :path path
+ :params params
+ :callback (fn [res]
+ (dispatch [:command-handler! chat-id parameters res]))})])))))
(register-handler :prepare-message
(u/side-effect!
diff --git a/src/status_im/chat/handlers/webview_bridge.cljs b/src/status_im/chat/handlers/webview_bridge.cljs
index b1d4dc96fd..c20db56267 100644
--- a/src/status_im/chat/handlers/webview_bridge.cljs
+++ b/src/status_im/chat/handlers/webview_bridge.cljs
@@ -135,11 +135,12 @@
parameters {:context context
:parameters {:amount amount
:address address}}]
- (s/call-jail c/wallet-chat-id
- path
- parameters
- (fn [data]
- (log/debug :webview-send-eth-callback data)))))))
+ (s/call-jail
+ {:jail-id c/wallet-chat-id
+ :path path
+ :params parameters
+ :callback (fn [data]
+ (log/debug :webview-send-eth-callback data))})))))
(register-handler :webview-nfc
(u/side-effect!
diff --git a/src/status_im/components/status.cljs b/src/status_im/components/status.cljs
index 69904cd784..f2de4f43ec 100644
--- a/src/status_im/components/status.cljs
+++ b/src/status_im/components/status.cljs
@@ -8,7 +8,8 @@
[cljs.core.async :refer [json [data]
(.stringify js/JSON (clj->js data)))
@@ -135,11 +136,11 @@
(when status
(call-module #(.parseJail status chat-id file callback))))
-(defn call-jail [chat-id path params callback]
+(defn call-jail [{:keys [jail-id path params callback]}]
(when status
(call-module
#(do
- (log/debug :call-jail :chat-id chat-id)
+ (log/debug :call-jail :jail-id jail-id)
(log/debug :call-jail :path path)
(log/debug :call-jail :params params)
(let [params' (update params :context assoc
@@ -152,17 +153,17 @@
(doseq [{:keys [type message]} messages]
(log/debug (str "VM console(" type ") - " message)))
(callback r')))]
- (.callJail status chat-id (cljs->json path) (cljs->json params') cb))))))
+ (.callJail status jail-id (cljs->json path) (cljs->json params') cb))))))
(defn call-function!
[{:keys [chat-id function callback] :as opts}]
(let [path [:functions function]
params (select-keys opts [:parameters :context])]
(call-jail
- chat-id
- path
- params
- (or callback #(dispatch [:received-bot-response {:chat-id chat-id} %])))))
+ {:jail-id chat-id
+ :path path
+ :params params
+ :callback (or callback #(dispatch [:received-bot-response {:chat-id chat-id} %]))})))
(defn set-soft-input-mode [mode]
(when status