1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-29 00:57:50 +02: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:
claudiaHash 2021-04-06 10:49:16 +03:00 committed by GitHub
parent 432961b278
commit 36084fbc1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -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>

View File

@ -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