improve naming

This commit is contained in:
Simon Laux
2022-06-28 13:25:41 +02:00
parent 271d54e420
commit 659e48bd3f
5 changed files with 46 additions and 46 deletions

View File

@@ -19,7 +19,7 @@ interface NativeAccount {}
export class AccountManager extends EventEmitter {
dcn_accounts: NativeAccount
accountDir: string
json_rpc_started = false
jsonRpcStarted = false
constructor(cwd: string, os = 'deltachat-node') {
super()
@@ -122,17 +122,17 @@ export class AccountManager extends EventEmitter {
if (!callback) {
throw new Error('no callback set')
}
if (this.json_rpc_started) {
if (this.jsonRpcStarted) {
throw new Error('jsonrpc was started already')
}
binding.dcn_accounts_start_jsonrpc(this.dcn_accounts, callback.bind(this))
debug('Started jsonrpc handler')
this.json_rpc_started = true
this.jsonRpcStarted = true
}
jsonRPCRequest(message: string) {
if (!this.json_rpc_started) {
if (!this.jsonRpcStarted) {
throw new Error(
'jsonrpc is not active, start it with startJSONRPCHandler first'
)