From cfeebd11ebac5ad9584c4e819538a8a4c6f311c8 Mon Sep 17 00:00:00 2001 From: Swapnil Date: Thu, 14 Jul 2022 17:48:07 +0530 Subject: [PATCH] hooks: fix start(). --- packages/cln_plugin/lib/src/cln_plugin_base.dart | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/cln_plugin/lib/src/cln_plugin_base.dart b/packages/cln_plugin/lib/src/cln_plugin_base.dart index e707482..fea8908 100644 --- a/packages/cln_plugin/lib/src/cln_plugin_base.dart +++ b/packages/cln_plugin/lib/src/cln_plugin_base.dart @@ -242,17 +242,10 @@ class Plugin implements CLNPlugin { await _handlingSubscription( event: jsonRequest.method, request: param); } else { - if (!rpcMethods.containsKey(jsonRequest.method)) { - var result = await _callHook(jsonRequest.method, param); - var response = - Response(id: jsonRequest.id, result: result).toJson(); - stdout.write(json.encode(response)); - } else { - var result = await _callRPCMethod(jsonRequest.method, param); - var response = - Response(id: jsonRequest.id, result: result).toJson(); - stdout.write(json.encode(response)); - } + var result = await _callRPCMethod(jsonRequest.method, param); + var response = + Response(id: jsonRequest.id, result: result).toJson(); + stdout.write(json.encode(response)); } } catch (ex) { var response = Response(