Use the private RPC client for requests to Status backend when not coming from Dapps
This commit is contained in:
parent
d3202dffa7
commit
2136fe62ce
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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]]);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue