Skip to content

Commit

Permalink
commit 4 don't call Statusgo
Browse files Browse the repository at this point in the history
  • Loading branch information
flexsurfer committed Aug 1, 2019
1 parent 06d8d33 commit 8ebd2a1
Showing 1 changed file with 58 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@ private void doStartNode(final String jsonConfigString) {

prettyPrintConfig(updatedJsonConfigString);

String res = Statusgo.startNode(updatedJsonConfigString);
if (res.startsWith("{\"error\":\"\"")) {
Log.d(TAG, "StartNode result: " + res);
Log.d(TAG, "Geth node started");
}
else {
Log.e(TAG, "StartNode failed: " + res);
}
//String res = Statusgo.startNode(updatedJsonConfigString);
//if (res.startsWith("{\"error\":\"\"")) {
//Log.d(TAG, "StartNode result: " + res);
//Log.d(TAG, "Geth node started");
//}
//else {
// Log.e(TAG, "StartNode failed: " + res);
//}
} catch (JSONException e) {
Log.e(TAG, "updateConfig failed: " + e.getMessage());
System.exit(1);
Expand Down Expand Up @@ -378,7 +378,7 @@ public void stopNode() {
@Override
public void run() {
Log.d(TAG, "stopNode");
String res = Statusgo.stopNode();
//String res = Statusgo.stopNode();
}
};

Expand All @@ -396,9 +396,9 @@ public void login(final String json, final Callback callback) {
Runnable r = new Runnable() {
@Override
public void run() {
String result = Statusgo.login(json);
//String result = Statusgo.login(json);

callback.invoke(result);
//callback.invoke(result);
}
};

Expand All @@ -421,9 +421,9 @@ public void verify(final String address, final String password, final Callback c
Runnable r = new Runnable() {
@Override
public void run() {
String result = Statusgo.verifyAccountPassword(newKeystoreDir, address, password);
//String result = Statusgo.verifyAccountPassword(newKeystoreDir, address, password);

callback.invoke(result);
//callback.invoke(result);
}
};

Expand All @@ -441,9 +441,9 @@ public void loginWithKeycard(final String whisperPrivateKey, final String encryp
Runnable r = new Runnable() {
@Override
public void run() {
String result = Statusgo.loginWithKeycard(whisperPrivateKey, encryptionPublicKey);
//String result = Statusgo.loginWithKeycard(whisperPrivateKey, encryptionPublicKey);

callback.invoke(result);
//callback.invoke(result);
}
};

Expand All @@ -461,9 +461,9 @@ public void createAccount(final String password, final Callback callback) {
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.createAccount(password);
//String res = Statusgo.createAccount(password);

callback.invoke(res);
//callback.invoke(res);
}
};

Expand All @@ -481,8 +481,8 @@ public void sendDataNotification(final String dataPayloadJSON, final String toke
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.sendDataNotification(dataPayloadJSON, tokensJSON);
callback.invoke(res);
//String res = Statusgo.sendDataNotification(dataPayloadJSON, tokensJSON);
//callback.invoke(res);
}
};

Expand Down Expand Up @@ -631,9 +631,9 @@ public void addPeer(final String enode, final Callback callback) {
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.addPeer(enode);
//String res = Statusgo.addPeer(enode);

callback.invoke(res);
//callback.invoke(res);
}
};

Expand All @@ -651,9 +651,9 @@ public void recoverAccount(final String passphrase, final String password, final
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.recoverAccount(password, passphrase);
//String res = Statusgo.recoverAccount(password, passphrase);

callback.invoke(res);
//callback.invoke(res);
}
};

Expand All @@ -670,9 +670,9 @@ public void multiAccountGenerateAndDeriveAddresses(final String json, final Call
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.multiAccountGenerateAndDeriveAddresses(json);
//String res = Statusgo.multiAccountGenerateAndDeriveAddresses(json);

callback.invoke(res);
//callback.invoke(res);
}
};

Expand All @@ -689,9 +689,9 @@ public void multiAccountStoreDerived(final String json, final Callback callback)
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.multiAccountStoreDerivedAccounts(json);
//String res = Statusgo.multiAccountStoreDerivedAccounts(json);

callback.invoke(res);
//callback.invoke(res);
}
};

Expand All @@ -713,8 +713,8 @@ public void hashTransaction(final String txArgsJSON, final Callback callback) {
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.hashTransaction(txArgsJSON);
callback.invoke(res);
//String res = Statusgo.hashTransaction(txArgsJSON);
//callback.invoke(res);
}
};

Expand All @@ -732,8 +732,8 @@ public void hashMessage(final String message, final Callback callback) {
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.hashMessage(message);
callback.invoke(res);
//String res = Statusgo.hashMessage(message);
//callback.invoke(res);
}
};

Expand All @@ -751,8 +751,8 @@ public void hashTypedData(final String data, final Callback callback) {
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.hashTypedData(data);
callback.invoke(res);
//String res = Statusgo.hashTypedData(data);
//callback.invoke(res);
}
};

Expand All @@ -771,8 +771,8 @@ public void sendTransactionWithSignature(final String txArgsJSON, final String s
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.sendTransactionWithSignature(txArgsJSON, signature);
callback.invoke(res);
//String res = Statusgo.sendTransactionWithSignature(txArgsJSON, signature);
//callback.invoke(res);
}
};

Expand All @@ -790,8 +790,8 @@ public void sendTransaction(final String txArgsJSON, final String password, fina
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.sendTransaction(txArgsJSON, password);
callback.invoke(res);
//String res = Statusgo.sendTransaction(txArgsJSON, password);
//callback.invoke(res);
}
};

Expand All @@ -809,8 +809,8 @@ public void signMessage(final String rpcParams, final Callback callback) {
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.signMessage(rpcParams);
callback.invoke(res);
//String res = Statusgo.signMessage(rpcParams);
//callback.invoke(res);
}
};

Expand All @@ -828,8 +828,8 @@ public void signTypedData(final String data, final String account, final String
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.signTypedData(data, account, password);
callback.invoke(res);
//String res = Statusgo.signTypedData(data, account, password);
//callback.invoke(res);
}
};

Expand Down Expand Up @@ -926,8 +926,8 @@ public void callRPC(final String payload, final Callback callback) {
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.callRPC(payload);
callback.invoke(res);
//String res = Statusgo.callRPC(payload);
// callback.invoke(res);
}
};

Expand All @@ -939,8 +939,8 @@ public void callPrivateRPC(final String payload, final Callback callback) {
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.callPrivateRPC(payload);
callback.invoke(res);
// String res = Statusgo.callPrivateRPC(payload);
//callback.invoke(res);
}
};

Expand All @@ -955,13 +955,13 @@ public void closeApplication() {
@ReactMethod
public void connectionChange(final String type, final boolean isExpensive) {
Log.d(TAG, "ConnectionChange: " + type + ", is expensive " + isExpensive);
Statusgo.connectionChange(type, isExpensive ? 1 : 0);
//Statusgo.connectionChange(type, isExpensive ? 1 : 0);
}

@ReactMethod
public void appStateChange(final String type) {
Log.d(TAG, "AppStateChange: " + type);
Statusgo.appStateChange(type);
//Statusgo.appStateChange(type);
}

private static String uniqueID = null;
Expand Down Expand Up @@ -1024,9 +1024,9 @@ public void extractGroupMembershipSignatures(final String signaturePairs, final
Runnable r = new Runnable() {
@Override
public void run() {
String result = Statusgo.extractGroupMembershipSignatures(signaturePairs);
//String result = Statusgo.extractGroupMembershipSignatures(signaturePairs);

callback.invoke(result);
//callback.invoke(result);
}
};

Expand All @@ -1044,9 +1044,9 @@ public void signGroupMembership(final String content, final Callback callback) {
Runnable r = new Runnable() {
@Override
public void run() {
String result = Statusgo.signGroupMembership(content);
//String result = Statusgo.signGroupMembership(content);

callback.invoke(result);
//callback.invoke(result);
}
};

Expand All @@ -1065,9 +1065,9 @@ public void updateMailservers(final String enodes, final Callback callback) {
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.updateMailservers(enodes);
//String res = Statusgo.updateMailservers(enodes);

callback.invoke(res);
//callback.invoke(res);
}
};

Expand All @@ -1085,9 +1085,9 @@ public void chaosModeUpdate(final boolean on, final Callback callback) {
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.chaosModeUpdate(on);
//String res = Statusgo.chaosModeUpdate(on);

callback.invoke(res);
//callback.invoke(res);
}
};

Expand All @@ -1105,10 +1105,10 @@ public void getNodesFromContract(final String rpcEndpoint, final String contract
Runnable r = new Runnable() {
@Override
public void run() {
String res = Statusgo.getNodesFromContract(rpcEndpoint, contractAddress);
//String res = Statusgo.getNodesFromContract(rpcEndpoint, contractAddress);

Log.d(TAG, res);
callback.invoke(res);
//Log.d(TAG, res);
//callback.invoke(res);
}
};

Expand Down

0 comments on commit 8ebd2a1

Please sign in to comment.