From e702481797dcdde6547697e2dbb67f3c0946d56a Mon Sep 17 00:00:00 2001 From: Kolagold2004 Date: Tue, 6 Oct 2026 21:39:40 +0100 Subject: [PATCH] fix: address Parallax issue #43 --- src/lib/platform.ts | 4 ++++ src/pages/landing.tsx | 11 +++++++++++ src/vite-env.d.ts | 9 +++++++++ 3 files changed, 24 insertions(+) create mode 100644 src/vite-env.d.ts diff --git a/src/lib/platform.ts b/src/lib/platform.ts index f368e29..8f2c2d7 100644 --- a/src/lib/platform.ts +++ b/src/lib/platform.ts @@ -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. */ diff --git a/src/pages/landing.tsx b/src/pages/landing.tsx index eda05c3..4b7794d 100644 --- a/src/pages/landing.tsx +++ b/src/pages/landing.tsx @@ -464,6 +464,17 @@ export function Landing() { {PLATFORM.name} — {PLATFORM.tagline.toLowerCase()}. Preview: no GitHub, wallet, or funds are connected yet.
+ {PLATFORM.contractId && ( + + {PLATFORM.network} escrow {PLATFORM.contractId.slice(0, 5)}…{PLATFORM.contractId.slice(-5)} + + )} Explore List your repo
diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts new file mode 100644 index 0000000..7667406 --- /dev/null +++ b/src/vite-env.d.ts @@ -0,0 +1,9 @@ +/// + +interface ImportMetaEnv { + readonly VITE_ESCROW_CONTRACT_ID?: string; +} + +interface ImportMeta { + readonly env: ImportMetaEnv; +}