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