mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
parent
db7ae82f4a
commit
6541068364
@ -44,6 +44,7 @@ const TokensPriceQuery = gql`
|
|||||||
}
|
}
|
||||||
fixedRateExchanges {
|
fixedRateExchanges {
|
||||||
id
|
id
|
||||||
|
exchangeId
|
||||||
price
|
price
|
||||||
baseToken {
|
baseToken {
|
||||||
symbol
|
symbol
|
||||||
@ -104,6 +105,7 @@ const TokenPriceQuery = gql`
|
|||||||
}
|
}
|
||||||
fixedRateExchanges {
|
fixedRateExchanges {
|
||||||
id
|
id
|
||||||
|
exchangeId
|
||||||
price
|
price
|
||||||
baseToken {
|
baseToken {
|
||||||
symbol
|
symbol
|
||||||
@ -161,7 +163,7 @@ function getAccessDetailsFromTokenPrice(
|
|||||||
if (tokenPrice.dispensers && tokenPrice.dispensers.length > 0) {
|
if (tokenPrice.dispensers && tokenPrice.dispensers.length > 0) {
|
||||||
const dispenser = tokenPrice.dispensers[0]
|
const dispenser = tokenPrice.dispensers[0]
|
||||||
accessDetails.type = 'free'
|
accessDetails.type = 'free'
|
||||||
accessDetails.addressOrId = dispenser.id
|
accessDetails.addressOrId = dispenser.token.id
|
||||||
accessDetails.price = '0'
|
accessDetails.price = '0'
|
||||||
accessDetails.isPurchasable = dispenser.active
|
accessDetails.isPurchasable = dispenser.active
|
||||||
accessDetails.datatoken = {
|
accessDetails.datatoken = {
|
||||||
@ -179,7 +181,7 @@ function getAccessDetailsFromTokenPrice(
|
|||||||
) {
|
) {
|
||||||
const fixed = tokenPrice.fixedRateExchanges[0]
|
const fixed = tokenPrice.fixedRateExchanges[0]
|
||||||
accessDetails.type = 'fixed'
|
accessDetails.type = 'fixed'
|
||||||
accessDetails.addressOrId = fixed.id
|
accessDetails.addressOrId = fixed.exchangeId
|
||||||
accessDetails.price = fixed.price
|
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.
|
// 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
|
accessDetails.isPurchasable = fixed.active
|
||||||
|
Loading…
Reference in New Issue
Block a user