From 34e7d99b7047981141de472d5891883a10cecc1a Mon Sep 17 00:00:00 2001 From: Alfreedom <00tango.bromine@icloud.com> Date: Tue, 20 Feb 2024 12:58:54 +0100 Subject: [PATCH] minor change --- lib/apis/sign_api/sign_engine.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/apis/sign_api/sign_engine.dart b/lib/apis/sign_api/sign_engine.dart index 5d78bf29..56f80f50 100644 --- a/lib/apis/sign_api/sign_engine.dart +++ b/lib/apis/sign_api/sign_engine.dart @@ -1278,7 +1278,8 @@ class SignEngine implements ISignEngine { request.request.method, ); - // else, we send an onSessionRequest event + // We send onSessionRequest event on every session request, + // the developer can decide wether to use it or just register method handlers onSessionRequest.broadcast( SessionRequestEvent.fromSessionRequest( sessionRequest, @@ -1286,8 +1287,8 @@ class SignEngine implements ISignEngine { ); final methodHandler = _methodHandlers[methodKey]; + // If a method handler has been set using registerRequestHandler we use it to process the request if (methodHandler != null) { - // If a method handler has been set using registerRequestHandler we use it to process the request try { final result = await methodHandler(topic, request.request.params); await core.pairing.sendResult(