Skip to content

Commit

Permalink
added missed functions in desktop implementation of react-native-status
Browse files Browse the repository at this point in the history
  • Loading branch information
vkjr committed Sep 4, 2019
1 parent 5cee5ac commit 76a67af
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions modules/react-native-status/desktop/rctstatus.cpp
Expand Up @@ -335,6 +335,24 @@ void RCTStatus::multiAccountDeriveAddresses(QString json, double callbackId) {
}, json, callbackId);
}

void RCTStatus::multiAccountStoreDerived(QString json, double callbackId) {
Q_D(RCTStatus);
QtConcurrent::run([&](QString json, double callbackId) {
const char* result = MultiAccountStoreDerivedAccounts(json.toUtf8().data());
logStatusGoResult("::multiAccountStoreDerived", result);
d->bridge->invokePromiseCallback(callbackId, QVariantList{result});
}, json, callbackId);
}


void RCTStatus::multiAccountImportMnemonic(QString json, double callbackId) {
Q_D(RCTStatus);
QtConcurrent::run([&](QString json, double callbackId) {
const char* result = MultiAccountImportMnemonic(json.toUtf8().data());
logStatusGoResult("::multiAccountImportMnemonic", result);
d->bridge->invokePromiseCallback(callbackId, QVariantList{result});
}, json, callbackId);
}

void RCTStatus::verify(QString address, QString password, double callbackId) {
Q_D(RCTStatus);
Expand Down
2 changes: 2 additions & 0 deletions modules/react-native-status/desktop/rctstatus.h
Expand Up @@ -49,6 +49,8 @@ class RCTStatus : public QObject, public ModuleInterface {
Q_INVOKABLE void multiAccountLoadAccount(QString json, double callbackId);
Q_INVOKABLE void multiAccountReset(double callbackId);
Q_INVOKABLE void multiAccountDeriveAddresses(QString json, double callbackId);
Q_INVOKABLE void multiAccountImportMnemonic(QString json, double callbackId);
Q_INVOKABLE void multiAccountStoreDerived(QString json, double callbackId);
Q_INVOKABLE void verify(QString address, QString password, double callbackId);
Q_INVOKABLE void sendTransaction(QString txArgsJSON, QString password, double callbackId);
Q_INVOKABLE void signMessage(QString rpcParams, double callbackId);
Expand Down

0 comments on commit 76a67af

Please sign in to comment.