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
|
||||
price: string
|
||||
checked: boolean
|
||||
symbol: string
|
||||
}
|
||||
|
||||
function Empty() {
|
||||
@ -99,7 +100,7 @@ export default function AssetSelection({
|
||||
</h3>
|
||||
|
||||
<Dotdotdot clamp={1} tagName="code" className={styles.did}>
|
||||
{asset.did}
|
||||
{asset.symbol} | {asset.did}
|
||||
</Dotdotdot>
|
||||
</label>
|
||||
|
||||
|
@ -114,9 +114,11 @@ export async function transformDDOToAssetSelection(
|
||||
const source = axios.CancelToken.source()
|
||||
const didList: string[] = []
|
||||
const priceList: any = {}
|
||||
const symbolList: any = {}
|
||||
ddoList.forEach((ddo: DDO) => {
|
||||
didList.push(ddo.id)
|
||||
priceList[ddo.id] = ddo.price.value
|
||||
symbolList[ddo.id] = ddo.dataTokenInfo.symbol
|
||||
})
|
||||
const ddoNames = await getAssetsNames(didList, metadataCacheUri, source.token)
|
||||
const algorithmList: AssetSelectionAsset[] = []
|
||||
@ -132,13 +134,15 @@ export async function transformDDOToAssetSelection(
|
||||
did: did,
|
||||
name: ddoNames[did],
|
||||
price: priceList[did],
|
||||
checked: selected
|
||||
checked: selected,
|
||||
symbol: symbolList[did]
|
||||
})
|
||||
: algorithmList.push({
|
||||
did: did,
|
||||
name: ddoNames[did],
|
||||
price: priceList[did],
|
||||
checked: selected
|
||||
checked: selected,
|
||||
symbol: symbolList[did]
|
||||
})
|
||||
})
|
||||
return algorithmList
|
||||
|
Loading…
Reference in New Issue
Block a user