floTokenAPI v1.2.1: bug fix for token API update

This commit is contained in:
Sai Raj 2024-08-04 23:22:29 -04:00
parent 3ef1be2958
commit 3fef7f222e

View File

@ -1,4 +1,4 @@
(function (EXPORTS) { //floTokenAPI v1.2.0 (function (EXPORTS) { //floTokenAPI v1.2.1
/* Token Operator to send/receive tokens via blockchain using API calls*/ /* Token Operator to send/receive tokens via blockchain using API calls*/
'use strict'; 'use strict';
const tokenAPI = EXPORTS; const tokenAPI = EXPORTS;
@ -79,10 +79,10 @@
fetch_api(`api/v2/transactionDetails/${txID}`).then(res => { fetch_api(`api/v2/transactionDetails/${txID}`).then(res => {
if (res.result === "error") if (res.result === "error")
reject(res.description); reject(res.description);
else if (!res.parsedFloData) //else if (!res.parsedFloData)
reject("Data piece (parsedFloData) missing"); // reject("Data piece (parsedFloData) missing");
else if (!res.transactionDetails) //else if (!res.transactionDetails)
reject("Data piece (transactionDetails) missing"); // reject("Data piece (transactionDetails) missing");
else else
resolve(res); resolve(res);
}).catch(error => reject(error)) }).catch(error => reject(error))