From ed9508740abd9a1a878dd74266c911b8c24fc61f Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 29 Oct 2014 11:33:07 -0700 Subject: [PATCH] return IsLocked and IsCrypted. --- src/bitcoindjs.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/bitcoindjs.cc b/src/bitcoindjs.cc index 421df936..af4be3ca 100644 --- a/src/bitcoindjs.cc +++ b/src/bitcoindjs.cc @@ -3748,10 +3748,14 @@ NAN_METHOD(WalletEncrypted) { "Usage: bitcoindjs.walletEncrypted()"); } - // bool isLocked = pwalletMain->IsLocked(); + bool isLocked = pwalletMain->IsLocked(); bool isEncrypted = pwalletMain->IsCrypted(); - NanReturnValue(NanNew(isEncrypted)); + Local result = NanNew(); + result->Set(NanNew("locked"), NanNew(isLocked)); + result->Set(NanNew("encrypted"), NanNew(isCrypted)); + + NanReturnValue(result); } /**