diff --git a/src/components/molecules/Bookmarks.tsx b/src/components/molecules/Bookmarks.tsx
index 0bd73a8c0..58fc09e87 100644
--- a/src/components/molecules/Bookmarks.tsx
+++ b/src/components/molecules/Bookmarks.tsx
@@ -1,8 +1,7 @@
import { useUserPreferences } from '../../providers/UserPreferences'
import React, { ReactElement, useEffect, useState } from 'react'
import Table from '../atoms/Table'
-import { DDO, Logger, ConfigHelperConfig } from '@oceanprotocol/lib'
-import { useOcean } from '../../providers/Ocean'
+import { DDO, Logger, BestPrice } from '@oceanprotocol/lib'
import Price from '../atoms/Price'
import Tooltip from '../atoms/Tooltip'
import AssetTitle from './AssetListTitle'
@@ -10,6 +9,7 @@ import {
queryMetadata,
transformChainIdsListToQuery
} from '../../utils/aquarius'
+import { getAssetsBestPrices, AssetListPrices } from '../../utils/subgraph'
import axios, { CancelToken } from 'axios'
import { useSiteMetadata } from '../../hooks/useSiteMetadata'
@@ -52,19 +52,19 @@ async function getAssetsBookmarked(
const columns = [
{
name: 'Data Set',
- selector: function getAssetRow(row: DDO) {
- const { attributes } = row.findServiceByType('metadata')
- return
+ selector: function getAssetRow(row: AssetListPrices) {
+ const { attributes } = row.ddo.findServiceByType('metadata')
+ return
},
maxWidth: '45rem',
grow: 1
},
{
name: 'Datatoken Symbol',
- selector: function getAssetRow(row: DDO) {
+ selector: function getAssetRow(row: AssetListPrices) {
return (
-
- {row.dataTokenInfo.symbol}
+
+ {row.ddo.dataTokenInfo.symbol}
)
},
@@ -72,7 +72,7 @@ const columns = [
},
{
name: 'Price',
- selector: function getAssetRow(row: DDO) {
+ selector: function getAssetRow(row: AssetListPrices) {
return
},
right: true
@@ -83,7 +83,7 @@ export default function Bookmarks(): ReactElement {
const { appConfig } = useSiteMetadata()
const { bookmarks } = useUserPreferences()
- const [pinned, setPinned] = useState()
+ const [pinned, setPinned] = useState()
const [isLoading, setIsLoading] = useState()
const { chainIds } = useUserPreferences()
@@ -106,7 +106,10 @@ export default function Bookmarks(): ReactElement {
chainIds,
source.token
)
- setPinned(resultPinned?.results)
+ const pinnedAssets: AssetListPrices[] = await getAssetsBestPrices(
+ resultPinned?.results
+ )
+ setPinned(pinnedAssets)
} catch (error) {
Logger.error(error.message)
}