From e746b4709c5f9eefdd4c0f363c6e0a8f78f0ee8a Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Mon, 7 Oct 2024 23:29:17 +0530 Subject: [PATCH] Added debugger for testing --- scripts/fn_pay.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/fn_pay.js b/scripts/fn_pay.js index ffadc6a..4f33d12 100644 --- a/scripts/fn_pay.js +++ b/scripts/fn_pay.js @@ -292,8 +292,10 @@ Cashier.checkIfTokenTxIsValid = function (tokenTxID, sender, amount) { floTokenAPI.getTx(tokenTxID).then(tx => { let parsedTxData = floTokenAPI.util.parseTxData(tx); console.debug(parsedTxData); - if (parsedTxData.type !== "transfer" || parsedTxData.transferType !== "token") - reject([true, "Invalid token transfer type"]); + if (parsedTxData.type !== "transfer" || parsedTxData.transferType !== "token"){ + debugger + reject([true, "Invalid token transfer type"]) + } else if (parsedTxData.tokenAmount !== amount) reject([true, "Incorrect token amount: " + parsedTxData.tokenAmount]); else if (parsedTxData.tokenIdentification !== floGlobals.currency)