From d8925fa471e3cf957eb4352aafc05922c6b719f9 Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Tue, 29 Aug 2023 08:44:46 +0300 Subject: [PATCH] fix template id type --- src/@utils/accessDetailsAndPricing.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/@utils/accessDetailsAndPricing.ts b/src/@utils/accessDetailsAndPricing.ts index e0e7286e2..76b66f5ae 100644 --- a/src/@utils/accessDetailsAndPricing.ts +++ b/src/@utils/accessDetailsAndPricing.ts @@ -111,7 +111,12 @@ function getAccessDetailsFromTokenPrice( // the last valid order should be the last reuse order tx id if there is one accessDetails.validOrderTx = reusedOrder?.tx || order?.tx } - accessDetails.templateId = tokenPrice.templateId + console.log('tokenPrice.templateId ', tokenPrice.templateId) + console.log(typeof tokenPrice.templateId) + accessDetails.templateId = + typeof tokenPrice.templateId === 'string' + ? parseInt(tokenPrice.templateId) + : tokenPrice.templateId // TODO: fetch order fee from sub query accessDetails.publisherMarketOrderFee = tokenPrice?.publishMarketFeeAmount