diff --git a/src/ui/src/components/Dashboard/BorrowMarketTokenTable.tsx b/src/ui/src/components/Dashboard/BorrowMarketTokenTable.tsx index 3d56ca02..e255a065 100644 --- a/src/ui/src/components/Dashboard/BorrowMarketTokenTable.tsx +++ b/src/ui/src/components/Dashboard/BorrowMarketTokenTable.tsx @@ -5,7 +5,7 @@ import React, { useState } from 'react'; import { useSelector } from 'react-redux'; -import { decimals } from 'tezoslendingplatformjs'; +import { AssetType, decimals, mainnetAddresses, testnetAddresses } from 'tezoslendingplatformjs'; import BigNumber from 'bignumber.js'; import Table from '@mui/material/Table'; @@ -35,9 +35,13 @@ const BorrowMarketTokenTable = (props) => { setMktModal(false); }; - const handleClickDetails = (address) => { + const handleClickDetails = (asset: AssetType) => { + const fTokenAddress = + process.env.REACT_APP_ENV == 'dev' ? testnetAddresses.fTokens[asset] : mainnetAddresses.fTokens[asset]; const tzktUrl = - process.env.REACT_APP_ENV == 'dev' ? `https://ghostnet.tzkt.io/${address}` : `https://tzkt.io/${address}`; + process.env.REACT_APP_ENV == "dev" + ? `https://ghostnet.tzkt.io/${fTokenAddress}/operations` + : `https://tzkt.io/${fTokenAddress}/operations`; window.open(tzktUrl, '_blank'); }; @@ -54,7 +58,9 @@ const BorrowMarketTokenTable = (props) => { - Token + + Token + Available Borrow APY @@ -66,7 +72,7 @@ const BorrowMarketTokenTable = (props) => { {(address && data.walletBalance) || (!address && data.marketSize) ? ( - +
{ % - + diff --git a/src/ui/src/components/Dashboard/SupplyMarketTokenTable.tsx b/src/ui/src/components/Dashboard/SupplyMarketTokenTable.tsx index 4dd88c85..2877665e 100644 --- a/src/ui/src/components/Dashboard/SupplyMarketTokenTable.tsx +++ b/src/ui/src/components/Dashboard/SupplyMarketTokenTable.tsx @@ -51,7 +51,7 @@ const SupplyMarketTokenTable = (props) => { Wallet Supply APY - + @@ -59,7 +59,7 @@ const SupplyMarketTokenTable = (props) => { {(address && data.walletBalance) || (!address && data.marketSize) ? ( handleClickMktModal(data)}> - +
{ % - +