use status-go's hackaton-alt branch
This commit is contained in:
parent
6921587e13
commit
6f6849f635
|
@ -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);
|
||||
|
|
|
@ -99,6 +99,13 @@
|
|||
ReferencedContainer = "container:StatusIm.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "OS_ACTIVITY_MODE"
|
||||
value = "disabled"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
|
|
|
@ -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')
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<artifactItem>
|
||||
<groupId>status-im</groupId>
|
||||
<artifactId>status-go-ios-simulator</artifactId>
|
||||
<version>0.9.8-g311f2b8</version>
|
||||
<version>hackaton-alt-gd3704fa</version>
|
||||
<type>zip</type>
|
||||
<overWrite>true</overWrite>
|
||||
<outputDirectory>./</outputDirectory>
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
[cljs.core.async :refer [<! timeout]]
|
||||
[status-im.utils.js-resources :as js-res]
|
||||
[status-im.i18n :as i]
|
||||
[status-im.utils.platform :as p]))
|
||||
[status-im.utils.platform :as p]
|
||||
[status-im.utils.scheduler :as scheduler]))
|
||||
|
||||
(defn cljs->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
|
||||
|
|
Loading…
Reference in New Issue