mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
output datatoken symbol for each asset in asset selection (#477)
Co-authored-by: claudia.holhos <claudia.holhos@hpm.ro>
This commit is contained in:
parent
432961b278
commit
36084fbc1f
@ -15,6 +15,7 @@ export interface AssetSelectionAsset {
|
|||||||
name: string
|
name: string
|
||||||
price: string
|
price: string
|
||||||
checked: boolean
|
checked: boolean
|
||||||
|
symbol: string
|
||||||
}
|
}
|
||||||
|
|
||||||
function Empty() {
|
function Empty() {
|
||||||
@ -99,7 +100,7 @@ export default function AssetSelection({
|
|||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<Dotdotdot clamp={1} tagName="code" className={styles.did}>
|
<Dotdotdot clamp={1} tagName="code" className={styles.did}>
|
||||||
{asset.did}
|
{asset.symbol} | {asset.did}
|
||||||
</Dotdotdot>
|
</Dotdotdot>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
@ -114,9 +114,11 @@ export async function transformDDOToAssetSelection(
|
|||||||
const source = axios.CancelToken.source()
|
const source = axios.CancelToken.source()
|
||||||
const didList: string[] = []
|
const didList: string[] = []
|
||||||
const priceList: any = {}
|
const priceList: any = {}
|
||||||
|
const symbolList: any = {}
|
||||||
ddoList.forEach((ddo: DDO) => {
|
ddoList.forEach((ddo: DDO) => {
|
||||||
didList.push(ddo.id)
|
didList.push(ddo.id)
|
||||||
priceList[ddo.id] = ddo.price.value
|
priceList[ddo.id] = ddo.price.value
|
||||||
|
symbolList[ddo.id] = ddo.dataTokenInfo.symbol
|
||||||
})
|
})
|
||||||
const ddoNames = await getAssetsNames(didList, metadataCacheUri, source.token)
|
const ddoNames = await getAssetsNames(didList, metadataCacheUri, source.token)
|
||||||
const algorithmList: AssetSelectionAsset[] = []
|
const algorithmList: AssetSelectionAsset[] = []
|
||||||
@ -132,13 +134,15 @@ export async function transformDDOToAssetSelection(
|
|||||||
did: did,
|
did: did,
|
||||||
name: ddoNames[did],
|
name: ddoNames[did],
|
||||||
price: priceList[did],
|
price: priceList[did],
|
||||||
checked: selected
|
checked: selected,
|
||||||
|
symbol: symbolList[did]
|
||||||
})
|
})
|
||||||
: algorithmList.push({
|
: algorithmList.push({
|
||||||
did: did,
|
did: did,
|
||||||
name: ddoNames[did],
|
name: ddoNames[did],
|
||||||
price: priceList[did],
|
price: priceList[did],
|
||||||
checked: selected
|
checked: selected,
|
||||||
|
symbol: symbolList[did]
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
return algorithmList
|
return algorithmList
|
||||||
|
Loading…
x
Reference in New Issue
Block a user