Skip to content

Commit

Permalink
Fix data entries and links
Browse files Browse the repository at this point in the history
  • Loading branch information
Redefinedgg committed Aug 13, 2024
1 parent 4dc0fb6 commit 3405446
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/pages/public/account/publicnet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -525,11 +525,11 @@ const PublicNet: FC<Props> = ({ id }) => {
<ul className="text-small condensed">
{information?.entries &&
Object.keys(information?.entries).map(
(entry, key) => {
(entry: string, key: number) => {
const { processedKey, processedValue } =
processKeys(
entry,
information?.entries[entry]
information.entries[entry]
);
return (
<li className="word-break" key={key}>
Expand Down
7 changes: 4 additions & 3 deletions src/pages/public/assets/AssetsListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ const AssetsListItem: FC<Props> = ({ item, tags }) => {
<div>
<b>
<a
title={item?.issuer}
aria-label={item?.issuer}
title={item?.code}
aria-label={item?.code}
className="account-address"
href={`https://stellar.expert/explorer/${net}/asset/${item?.code}-${item?.issuer}`}
style={{ marginRight: "1em" }}
target="_blank"
>
<span className="account-key" style={{ fontSize: "1.6rem" }}>
{item?.code}
Expand All @@ -64,7 +65,7 @@ const AssetsListItem: FC<Props> = ({ item, tags }) => {
title={item?.issuer}
aria-label={item?.issuer}
className="account-address"
href={`https://stellar.expert/explorer/${net}/asset/${item?.code}-${item?.issuer}`}
href={`/${net}/account?id=${item?.issuer}`}
style={{ marginRight: "1em" }}
>
<span className="account-key" style={{ fontSize: "1.6rem" }}>
Expand Down
8 changes: 3 additions & 5 deletions src/shared/lib/processKeys/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ const processKeys = (
if (patterns.some((pattern) => pattern.test(key))) {
switch (type) {
case "accounts":
processedValue = stellarSdk.StrKey.encodeEd25519PublicKey(
decodedValue
)
? `<a href="/public/account?id=${decodedValue}">Ready</a>`
: `<a href="#">${decodedValue}</a>`;
processedValue = stellarSdk.StrKey.isValidEd25519PublicKey(decodedValue)
? `<a href="/public/account?id=${decodedValue}">${decodedValue}</a>`
: `<span>${decodedValue}</span>`;
break;
case "links":
processedValue = `<a target="_blank" href="${decodedValue}">${decodedValue}</a>`;
Expand Down

0 comments on commit 3405446

Please sign in to comment.