Skip to content

Commit

Permalink
hooks: fix start().
Browse files Browse the repository at this point in the history
  • Loading branch information
swaptr authored and vincenzopalazzo committed Jul 14, 2022
1 parent fc7ee10 commit cfeebd1
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions packages/cln_plugin/lib/src/cln_plugin_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit cfeebd1

Please sign in to comment.