diff --git a/eth/main.cpp b/eth/main.cpp index 87f5e1b53..4d3707c10 100644 --- a/eth/main.cpp +++ b/eth/main.cpp @@ -1810,7 +1810,8 @@ int main(int argc, char** argv) #if ETH_JSCONSOLE || !ETH_TRUE JSLocalConsole console; shared_ptr rpcServer = make_shared(*console.connector(), web3, make_shared([&](){ return web3.ethereum(); }, getAccountPassword, keyManager), vector(), keyManager, *gasPricer); - console.eval("web3.admin.setSessionKey('" + jsonAdmin + "')"); + string sessionKey = rpcServer->newSession(SessionPermissions{{Priviledge::Admin}}); + console.eval("web3.admin.setSessionKey('" + sessionKey + "')"); while (!g_exit) { console.readExpression();