Skip to content

Commit

Permalink
Added voi explorer links
Browse files Browse the repository at this point in the history
  • Loading branch information
AryanPandeyy committed Nov 22, 2023
1 parent 0108bbb commit cd8d99c
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions app/app-sandbox/src/pages/TokenAddress/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ const Token = ({ address, token, transactions }) => {
<code style={{ display: "inline-block" }}>
{token.appId && (
<span>
Id: <Link to={`/token/${token.appId}`}>{token.appId}</Link>
Id:{" "}
<a
href={`https://voi.observer/explorer/application/${token.appId}/transactions/`}
>
{token.appId}
</a>
</span>
)}
<br />
Expand Down Expand Up @@ -83,7 +88,21 @@ const Token = ({ address, token, transactions }) => {
<Box sx={{ textAlign: "left" }}>
<h2>Transactions</h2>
<h3>
For: {NFDService.getNFDByAddress(address)?.[address]?.name || address}
For:{" "}
{NFDService.getNFDByAddress(address)?.[address]?.name ? (
<a
href={`https://voi.observer/explorer/account/${NFDService.getNFDByAddress(address)?.[address]?.name
}/transactions`}
>
{NFDService.getNFDByAddress(address)?.[address]?.name}
</a>
) : (
<a
href={`https://voi.observer/explorer/account/${address}/transactions`}
>
{address}
</a>
)}
</h3>
<TableContainer component={Paper}>
<Table sx={{ minWidth: 700 }} aria-label="customized table">
Expand Down Expand Up @@ -185,7 +204,7 @@ function Page() {
if (!transactions) return;
(async () => {
const addresses = Array.from(
new Set(transactions.map(([, from, to]) => [from, to]).flat())
new Set(transactions.map(([, from, to]) => [from, to]).flat()),
);
let doReload = false;
for (const address of addresses) {
Expand Down

0 comments on commit cd8d99c

Please sign in to comment.