From 6541068364123d1bd63c28b820c23e74b11778d3 Mon Sep 17 00:00:00 2001 From: mihaisc Date: Tue, 22 Feb 2022 18:10:26 +0200 Subject: [PATCH] fix exchange id (#1137) * fix exchange id * fix * fix dispenser --- src/@utils/accessDetailsAndPricing.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/@utils/accessDetailsAndPricing.ts b/src/@utils/accessDetailsAndPricing.ts index 1b1677c92..70d780bba 100644 --- a/src/@utils/accessDetailsAndPricing.ts +++ b/src/@utils/accessDetailsAndPricing.ts @@ -44,6 +44,7 @@ const TokensPriceQuery = gql` } fixedRateExchanges { id + exchangeId price baseToken { symbol @@ -104,6 +105,7 @@ const TokenPriceQuery = gql` } fixedRateExchanges { id + exchangeId price baseToken { symbol @@ -161,7 +163,7 @@ function getAccessDetailsFromTokenPrice( if (tokenPrice.dispensers && tokenPrice.dispensers.length > 0) { const dispenser = tokenPrice.dispensers[0] accessDetails.type = 'free' - accessDetails.addressOrId = dispenser.id + accessDetails.addressOrId = dispenser.token.id accessDetails.price = '0' accessDetails.isPurchasable = dispenser.active accessDetails.datatoken = { @@ -179,7 +181,7 @@ function getAccessDetailsFromTokenPrice( ) { const fixed = tokenPrice.fixedRateExchanges[0] accessDetails.type = 'fixed' - accessDetails.addressOrId = fixed.id + accessDetails.addressOrId = fixed.exchangeId accessDetails.price = fixed.price // in theory we should check dt balance here, we can skip this because in the market we always create fre with minting capabilities. accessDetails.isPurchasable = fixed.active