From 5d3a17fa3b40fbb25f4a9209c1249fdb1409e742 Mon Sep 17 00:00:00 2001 From: Diego Date: Thu, 22 Aug 2024 15:20:28 +0200 Subject: [PATCH] rearrange terms --- .../main/java/com/fidesmo/fdsm/ServiceDeliverySession.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/library/src/main/java/com/fidesmo/fdsm/ServiceDeliverySession.java b/library/src/main/java/com/fidesmo/fdsm/ServiceDeliverySession.java index 4bdf547..65c3f1e 100644 --- a/library/src/main/java/com/fidesmo/fdsm/ServiceDeliverySession.java +++ b/library/src/main/java/com/fidesmo/fdsm/ServiceDeliverySession.java @@ -104,6 +104,8 @@ public DeliveryResult call() throws FDSMException { } public DeliveryResult deliver(BIBO bibo, String appId, String serviceId) throws IOException, UnsupportedCallbackException { + APDUBIBO apduBibo = new APDUBIBO(bibo); + card.selectEmpty(apduBibo); // Address #4 JsonNode deviceInfo = client.rpc(client.getURI(FidesmoApiClient.DEVICES_URL, HexUtils.bin2hex(card.getCIN()), card.getBatchId())); byte[] iin = HexUtils.decodeHexString_imp(deviceInfo.get("iin").asText()); @@ -165,9 +167,6 @@ public DeliveryResult deliver(BIBO bibo, String appId, String serviceId) throws deliveryRequest.set("fields", mapToJsonNode(userInput)); - APDUBIBO apduBibo = new APDUBIBO(bibo); - card.selectEmpty(apduBibo); - JsonNode delivery = client.rpc(client.getURI(FidesmoApiClient.SERVICE_DELIVER_URL), deliveryRequest); String sessionId = delivery.get("sessionId").asText();