[#5558] ".callPrivateRPC is not a function" fix for desktop

This commit is contained in:
Andrey Shovkoplyas 2018-08-20 14:05:51 +03:00
parent 1cb5828ce6
commit 175dd48f67
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4
2 changed files with 19 additions and 28 deletions

View File

@ -37,7 +37,7 @@ ExternalProject_Add(StatusGo_ep
PREFIX ${StatusGo_PREFIX}
SOURCE_DIR ${StatusGo_SOURCE_DIR}
GIT_REPOSITORY https://github.com/status-im/status-go.git
GIT_TAG develop-ga6d69eba
GIT_TAG tags-v0.11.0^0-g4afd9e6c-302
BUILD_BYPRODUCTS ${StatusGo_STATIC_LIB}
CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${CONFIGURE_SCRIPT} ${GO_ROOT_PATH} ${StatusGo_ROOT} ${StatusGo_SOURCE_DIR}
BUILD_COMMAND ""

View File

@ -117,20 +117,6 @@ void RCTStatus::startNode(QString configString) {
}
void RCTStatus::shouldMoveToInternalStorage(double callbackId) {
Q_D(RCTStatus);
qDebug() << "call of RCTStatus::shouldMoveToInternalStorage with param callbackId: " << callbackId;
d->bridge->invokePromiseCallback(callbackId, QVariantList{});
}
void RCTStatus::moveToInternalStorage(double callbackId) {
Q_D(RCTStatus);
qDebug() << "call of RCTStatus::moveToInternalStorage with param callbackId: " << callbackId;
d->bridge->invokePromiseCallback(callbackId, QVariantList{ "{\"result\":\"\"}" });
}
void RCTStatus::stopNode() {
qDebug() << "call of RCTStatus::stopNode";
const char* result = StopNode();
@ -183,19 +169,24 @@ void RCTStatus::login(QString address, QString password, double callbackId) {
}
void RCTStatus::approveSignRequests(QString hashes, QString password, double callbackId) {
void RCTStatus::sendTransaction(QString txArgsJSON, QString password, double callbackId) {
Q_D(RCTStatus);
qDebug() << "call of RCTStatus::approveSignRequests with param callbackId: " << callbackId;
const char* result = ApproveSignRequests(hashes.toUtf8().data(), password.toUtf8().data());
qDebug() << "RCTStatus::approveSignRequests CompleteTransactions result: " << result;
qDebug() << "call of RCTStatus::sendTransaction with param callbackId: " << callbackId;
const char* result = SendTransaction(txArgsJSON.toUtf8().data(), password.toUtf8().data());
qDebug() << "RCTStatus::sendTransaction SendTransaction result: " << result;
d->bridge->invokePromiseCallback(callbackId, QVariantList{result});
}
void RCTStatus::discardSignRequest(QString id) {
qDebug() << "call of RCTStatus::discardSignRequest with id: " << id;
DiscardSignRequest(id.toUtf8().data());
void RCTStatus::signMessage(QString rpcParams, double callbackId) {
Q_D(RCTStatus);
qDebug() << "call of RCTStatus::signMessage with param callbackId: " << callbackId;
const char* result = SignMessage(rpcParams.toUtf8().data());
qDebug() << "RCTStatus::signMessage SignMessage result: " << result;
d->bridge->invokePromiseCallback(callbackId, QVariantList{result});
}
void RCTStatus::setAdjustResize() {
}
@ -217,19 +208,19 @@ void RCTStatus::clearStorageAPIs() {
}
void RCTStatus::sendWeb3Request(QString payload, double callbackId) {
void RCTStatus::callRPC(QString payload, double callbackId) {
Q_D(RCTStatus);
qDebug() << "call of RCTStatus::sendWeb3Request with param callbackId: " << callbackId;
qDebug() << "call of RCTStatus::callRPC with param callbackId: " << callbackId;
const char* result = CallRPC(payload.toUtf8().data());
qDebug() << "RCTStatus::sendWeb3Request CallRPC result: " << result;
qDebug() << "RCTStatus::callRPC CallRPC result: " << result;
d->bridge->invokePromiseCallback(callbackId, QVariantList{result});
}
void RCTStatus::sendWeb3PrivateRequest(QString payload, double callbackId) {
void RCTStatus::callPrivateRPC(QString payload, double callbackId) {
Q_D(RCTStatus);
qDebug() << "call of RCTStatus::sendWeb3PrivateRequest with param callbackId: " << callbackId;
qDebug() << "call of RCTStatus::callPrivateRPC with param callbackId: " << callbackId;
const char* result = CallPrivateRPC(payload.toUtf8().data());
qDebug() << "RCTStatus::sendWeb3PrivateRequest CallPrivateRPC result: " << result;
qDebug() << "RCTStatus::callPrivateRPC CallPrivateRPC result: " << result;
d->bridge->invokePromiseCallback(callbackId, QVariantList{result});
}