Use the private RPC client for requests to Status backend when not coming from Dapps

This commit is contained in:
Pedro Pombeiro 2018-06-05 19:23:10 +02:00 committed by Roman Volosovskyi
parent d3202dffa7
commit 2136fe62ce
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
4 changed files with 5 additions and 5 deletions

View File

@ -95,7 +95,7 @@ class JSCJail implements Jail {
JSFunction web3send = new JSFunction(context, "web3send") {
public String web3send(String payload) {
return Statusgo.CallRPC(payload);
return Statusgo.CallPrivateRPC(payload);
}
};
context.property("web3send", web3send);
@ -105,7 +105,7 @@ class JSCJail implements Jail {
Runnable r = new Runnable() {
@Override
public void run() {
String result = Statusgo.CallRPC(payload);
String result = Statusgo.CallPrivateRPC(payload);
callback.toFunction().call(null, result);
}
};

View File

@ -703,7 +703,7 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.CallRPC(payload);
String res = Statusgo.CallPrivateRPC(payload);
callback.invoke(res);
}
};

View File

@ -13,7 +13,7 @@
- (NSString *)send:(JSValue *)payload
{
char * result = CallRPC((char *) [[payload toString] UTF8String]);
char * result = CallPrivateRPC((char *) [[payload toString] UTF8String]);
return [NSString stringWithUTF8String: result];
}

View File

@ -375,7 +375,7 @@ RCT_EXPORT_METHOD(clearStorageAPIs) {
RCT_EXPORT_METHOD(sendWeb3Request:(NSString *)payload
callback:(RCTResponseSenderBlock)callback) {
dispatch_async( dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
char * result = CallRPC((char *) [payload UTF8String]);
char * result = CallPrivateRPC((char *) [payload UTF8String]);
dispatch_async( dispatch_get_main_queue(), ^{
callback(@[[NSString stringWithUTF8String: result]]);
});