mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
typo fixes
This commit is contained in:
parent
a92a7b88d9
commit
0740917731
@ -10,7 +10,7 @@ import {
|
|||||||
SearchQuery
|
SearchQuery
|
||||||
} from '@oceanprotocol/lib/dist/node/metadatacache/MetadataCache'
|
} from '@oceanprotocol/lib/dist/node/metadatacache/MetadataCache'
|
||||||
import { AssetSelectionAsset } from '../components/molecules/FormFields/AssetSelection'
|
import { AssetSelectionAsset } from '../components/molecules/FormFields/AssetSelection'
|
||||||
import { getAssetPrice } from './subgraph'
|
import { getAssetPrices } from './subgraph'
|
||||||
import axios, { CancelToken, AxiosResponse } from 'axios'
|
import axios, { CancelToken, AxiosResponse } from 'axios'
|
||||||
|
|
||||||
// TODO: import directly from ocean.js somehow.
|
// TODO: import directly from ocean.js somehow.
|
||||||
@ -113,7 +113,7 @@ export async function transformDDOToAssetSelection(
|
|||||||
): Promise<AssetSelectionAsset[]> {
|
): Promise<AssetSelectionAsset[]> {
|
||||||
const source = axios.CancelToken.source()
|
const source = axios.CancelToken.source()
|
||||||
const didList: string[] = []
|
const didList: string[] = []
|
||||||
const priceList: any = await getAssetPrice(ddoList)
|
const priceList: any = await getAssetPrices(ddoList)
|
||||||
const symbolList: any = {}
|
const symbolList: any = {}
|
||||||
for (const ddo of ddoList) {
|
for (const ddo of ddoList) {
|
||||||
didList.push(ddo.id)
|
didList.push(ddo.id)
|
||||||
|
@ -85,7 +85,7 @@ export async function getPreviousOrders(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getAssetPrice(assets: DDO[]): Promise<any> {
|
export async function getAssetPrices(assets: DDO[]): Promise<any> {
|
||||||
const priceList: any = {}
|
const priceList: any = {}
|
||||||
const poolPriceAssets: string[] = []
|
const poolPriceAssets: string[] = []
|
||||||
const poolDTadressDID: any = {}
|
const poolDTadressDID: any = {}
|
||||||
@ -109,8 +109,8 @@ export async function getAssetPrice(assets: DDO[]): Promise<any> {
|
|||||||
datatokenAddress_in: poolPriceAssets
|
datatokenAddress_in: poolPriceAssets
|
||||||
}
|
}
|
||||||
const poolPriceResponse: any = await fetchData(poolQuery, poolVariables)
|
const poolPriceResponse: any = await fetchData(poolQuery, poolVariables)
|
||||||
for (const poolPirce of poolPriceResponse.data?.pools) {
|
for (const poolPrice of poolPriceResponse.data?.pools) {
|
||||||
priceList[poolDTadressDID[poolPirce.datatokenAddress]] = poolPirce.spotPrice
|
priceList[poolDTadressDID[poolPrice.datatokenAddress]] = poolPrice.spotPrice
|
||||||
}
|
}
|
||||||
const frePriceResponse: any = await fetchData(freQuery, freVariables)
|
const frePriceResponse: any = await fetchData(freQuery, freVariables)
|
||||||
for (const frePrice of frePriceResponse.data?.fixedRateExchanges) {
|
for (const frePrice of frePriceResponse.data?.fixedRateExchanges) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user