From f12ece1a8f69ac749758a60a2b6b0fe351b2f7a6 Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Thu, 18 Aug 2022 14:01:43 +0530 Subject: [PATCH] minor code refactoring --- scripts/fn_ui.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/fn_ui.js b/scripts/fn_ui.js index 9fe5c86..9a2bdb5 100644 --- a/scripts/fn_ui.js +++ b/scripts/fn_ui.js @@ -497,12 +497,10 @@ async function completeTokenToCashRequest(request) { let upiID; if (upi_id instanceof Object && "secret" in upi_id) { try { - const privateKey = await floDapps.user.private - console.log(upiID) - upiID = floCrypto.decryptData(upi_id, privateKey); + upiID = floDapps.user.decrypt(upi_id); } catch (error) { console.error("UPI ID is not encrypted with a proper key", error); - return notify("Invalid UPI ID", 'error'); + return notify("UPI ID is not encrypted with a proper key", 'error'); } } else upiID = upi_id;