Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change chain name copy #170

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="POAP.gallery is an explorer for POAP tokens that searches by event and token address. Proof of Attendance Protocol (POAP) runs on Ethereum ERC-721 and xDai"/>
<meta name="description" content="POAP.gallery is an explorer for POAP tokens that searches by event and token address. Proof of Attendance Protocol (POAP) runs on Ethereum ERC-721 and Gnosis Chain"/>
<meta name="keywords" content="POAP, Ethereum, ERC-721, Attendance, NFT" />

<meta property="og:title" content="POAP Gallery">
<meta property="og:description" content="POAP.gallery is an explorer for POAP tokens that searches by event and token address. Proof of Attendance Protocol (POAP) runs on Ethereum ERC-721 and xDai">
<meta property="og:description" content="POAP.gallery is an explorer for POAP tokens that searches by event and token address. Proof of Attendance Protocol (POAP) runs on Ethereum ERC-721 and Gnosis Chain">
<meta property="og:image" content="%PUBLIC_URL%/icons/poap_dark.png">

<link rel="apple-touch-icon" sizes="57x57" href="%PUBLIC_URL%/icons/apple-icon-57x57.png" />
Expand Down
9 changes: 5 additions & 4 deletions src/components/activityTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import toast from 'react-hot-toast';
import {
ActivityType,
getActivityName,
getChainName,
getLastTransfers,
POAP_APP_URL,
} from '../store/api';
Expand Down Expand Up @@ -131,7 +132,7 @@ function Transfer({ transfer }) {
#{transfer.eventId}
</Link>
</object>{' '}
on {transfer.chain}
on {getChainName(transfer.chain)}
</span>
) : transfer.type === ActivityType.TRANSFER ? (
<span>
Expand All @@ -157,7 +158,7 @@ function Transfer({ transfer }) {
{transfer.to.substring(0, 8) + '…'}{' '}
</a>
</object>
on {transfer.chain}
on {getChainName(transfer.chain)}
</span>
) : transfer.type === ActivityType.MIGRATION ? (
<span>
Expand All @@ -173,15 +174,15 @@ function Transfer({ transfer }) {
{transfer.to.substring(0, 16) + '…'}{' '}
</a>
</object>
from {transfer.chain} to Ethereum
from {getChainName(transfer.chain)} to Ethereum
</span>
) : transfer.type === ActivityType.BURN ? (
<span>
POAP burned on event{' '}
<Link to={`/event/${transfer.eventId}`}>
#{transfer.eventId}
</Link>{' '}
on {transfer.chain}
on {getChainName(transfer.chain)}
</span>
) : null}
</div>
Expand Down
9 changes: 5 additions & 4 deletions src/pages/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
import {
ActivityType,
getActivityName,
getChainName,
getLastTransfers,
POAP_APP_URL,
} from '../store/api';
Expand Down Expand Up @@ -318,19 +319,19 @@ function TokenRowDescription({ transfer }) {
{' '}
{transfer.to.substring(0, 16) + '…'}{' '}
</a>
from {transfer.chain} to Ethereum
from {getChainName(transfer.chain)} to Ethereum
</span>
) : transfer.type === ActivityType.CLAIM ? (
<span>
POAP minted on event{' '}
<Link to={`/event/${transfer.eventId}`}>#{transfer.eventId}</Link> on{' '}
{transfer.chain}
{getChainName(transfer.chain)}
</span>
) : transfer.type === ActivityType.BURN ? (
<span>
POAP burned on event{' '}
<Link to={`/event/${transfer.eventId}`}>#{transfer.eventId}</Link> on{' '}
{transfer.chain}
{getChainName(transfer.chain)}
</span>
) : (
<span>
Expand All @@ -352,7 +353,7 @@ function TokenRowDescription({ transfer }) {
{' '}
{shrinkAddress(transfer.to, 10)}
</a>{' '}
on {transfer.chain}
on {getChainName(transfer.chain)}
</span>
)}
</div>
Expand Down
7 changes: 7 additions & 0 deletions src/store/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ export function getActivityName(type) {
return type !== ActivityType.CLAIM ? ActivityType.CLAIM : 'MINT';
}

export function getChainName(chain) {
if (chain === 'xdai') {
return 'gnosis';
}
return chain;
}

export async function getTop3Events() {
const fromCompassDropToEventInfo = (compassDrop) => {
return {
Expand Down