From 71cba9872d2faf44608d25ca2bac56d56bb8acb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20K=C3=B6pp?= Date: Mon, 20 Apr 2026 21:15:21 +0200 Subject: [PATCH 1/2] Cleanup(FuncProp-Wrapper): Check `online.getMaxApduLength` is Available --- src/Common.script.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Common.script.js b/src/Common.script.js index dd758436..f3723518 100644 --- a/src/Common.script.js +++ b/src/Common.script.js @@ -46,10 +46,9 @@ function BASE_getUnsupportedEtsModules(device, online, progress, context) { } function BASE_invokeFunctionPropertyWrapper(objectIndex, propertyId, data, device, online, progress, progress_start, progress_end) { - try { + var apduLength = 15; + if (typeof online.getMaxApduLength == "function") { apduLength = online.getMaxApduLength(); - } catch (error) { - apduLength = 15; } info("BASE_invokeFunctionPropertyWrapper: APDU = " + apduLength); From 1a3998f302eb74f9e6c89355fc2a418cc9d3bbc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cornelius=20K=C3=B6pp?= Date: Mon, 20 Apr 2026 21:19:53 +0200 Subject: [PATCH 2/2] Cleanup(FuncProp-Wrapper): Use `Log` for Logging --- src/Common.script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common.script.js b/src/Common.script.js index f3723518..58a4c36f 100644 --- a/src/Common.script.js +++ b/src/Common.script.js @@ -50,7 +50,7 @@ function BASE_invokeFunctionPropertyWrapper(objectIndex, propertyId, data, devic if (typeof online.getMaxApduLength == "function") { apduLength = online.getMaxApduLength(); } - info("BASE_invokeFunctionPropertyWrapper: APDU = " + apduLength); + Log.info("BASE_invokeFunctionPropertyWrapper: APDU = " + apduLength); // set optional parameter values progress_start = progress_start || 0; @@ -141,7 +141,7 @@ function BASE_invokeFunctionPropertyWrapper(objectIndex, propertyId, data, devic } // until the response sequence number is non-negative } while (respSequenceNumber < 0); - info("BASE_invokeFunctionPropertyWrapper: response = " + response); + Log.info("BASE_invokeFunctionPropertyWrapper: response = " + response); return response; }