Skip to content
Open
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
4 changes: 4 additions & 0 deletions src/lib/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export const PLATFORM = {
network: 'testnet',
/** Bounty asset. */
asset: 'USDC',
/** Optional deployed escrow contract id, supplied by the hosting environment. */
contractId: import.meta.env.VITE_ESCROW_CONTRACT_ID?.trim() ?? '',
/** Stellar Expert base path for the configured network's contracts. */
contractExplorerUrl: 'https://stellar.expert/explorer/testnet/contract',
} as const;

/** GitHub's language colours, so language dots read the way contributors expect. */
Expand Down
11 changes: 11 additions & 0 deletions src/pages/landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,17 @@ export function Landing() {
{PLATFORM.name} — {PLATFORM.tagline.toLowerCase()}. Preview: no GitHub, wallet, or funds are connected yet.
</span>
<div className="row" style={{ gap: 14 }}>
{PLATFORM.contractId && (
<a
className="dim"
href={`${PLATFORM.contractExplorerUrl}/${encodeURIComponent(PLATFORM.contractId)}`}
target="_blank"
rel="noreferrer"
aria-label={`${PLATFORM.chain} ${PLATFORM.network} escrow contract ${PLATFORM.contractId}`}
>
{PLATFORM.network} escrow <span className="mono">{PLATFORM.contractId.slice(0, 5)}…{PLATFORM.contractId.slice(-5)}</span>
</a>
)}
<Link className="dim" to="/explore">Explore</Link>
<Link className="dim" to="/maintainer/login">List your repo</Link>
</div>
Expand Down
9 changes: 9 additions & 0 deletions src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/// <reference types="vite/client" />

interface ImportMetaEnv {
readonly VITE_ESCROW_CONTRACT_ID?: string;
}

interface ImportMeta {
readonly env: ImportMetaEnv;
}