From cb4bce2f60b8b831fc1c7ab1b3a6804e199ac970 Mon Sep 17 00:00:00 2001 From: Nishan Date: Tue, 7 Nov 2023 09:03:26 +0530 Subject: [PATCH] crossmint integration --- apps/expo/.env.development | 3 +- apps/expo/.env.production | 3 +- .../creator-token/buy-creator-token.tsx | 35 +++++++++++-------- packages/app/types.ts | 1 + packages/app/types/environment.d.ts | 2 ++ 5 files changed, 28 insertions(+), 16 deletions(-) diff --git a/apps/expo/.env.development b/apps/expo/.env.development index 87260cc40a..07ae7fe5b8 100644 --- a/apps/expo/.env.development +++ b/apps/expo/.env.development @@ -37,4 +37,5 @@ NEXT_PUBLIC_KV_REST_API_URL=https://patient-gar-40486.kv.vercel-storage.com NEXT_PUBLIC_KV_REST_API_TOKEN=Ap4mASQgZmRhZDFlNTYtOTViMi00ZDQzLTg3N2ItOWEzYWQwY2Y5NGJmXFJxyhlB-QtE3C_-WS3HwhtKmaDdlHR65OjUS1jFTok= # regarding to Expo, this could increase ANRs slighty but fixes the SplashScreen issue for now -EX_UPDATES_ANDROID_DELAY_LOAD_APP="false" \ No newline at end of file +EX_UPDATES_ANDROID_DELAY_LOAD_APP="false" +NEXT_PUBLIC_CROSSMINT_PROJECT_ID=043c259c-878c-49a9-bd86-cf99f583125b diff --git a/apps/expo/.env.production b/apps/expo/.env.production index 62ce7e41c3..f6eefc5231 100644 --- a/apps/expo/.env.production +++ b/apps/expo/.env.production @@ -37,4 +37,5 @@ NEXT_PUBLIC_KV_REST_API_URL=https://patient-gar-40486.kv.vercel-storage.com NEXT_PUBLIC_KV_REST_API_TOKEN=Ap4mASQgZmRhZDFlNTYtOTViMi00ZDQzLTg3N2ItOWEzYWQwY2Y5NGJmXFJxyhlB-QtE3C_-WS3HwhtKmaDdlHR65OjUS1jFTok= # regarding to Expo, this could increase ANRs slighty but fixes the SplashScreen issue for now -EX_UPDATES_ANDROID_DELAY_LOAD_APP="false" \ No newline at end of file +EX_UPDATES_ANDROID_DELAY_LOAD_APP="false" +NEXT_PUBLIC_CROSSMINT_PROJECT_ID=ebde9457-61c1-469c-98e7-26e209defcaf diff --git a/packages/app/components/creator-token/buy-creator-token.tsx b/packages/app/components/creator-token/buy-creator-token.tsx index 9b6e33e92c..f2f2974789 100644 --- a/packages/app/components/creator-token/buy-creator-token.tsx +++ b/packages/app/components/creator-token/buy-creator-token.tsx @@ -441,20 +441,27 @@ export const BuyCreatorToken = () => { {renderBuyButton()} - + {profileData?.data?.profile.creator_token?.crossmint_id !== null ? ( + + ) : null} + {paymentMethod === "USDC" diff --git a/packages/app/types.ts b/packages/app/types.ts index cf7338a89b..f86678a84e 100644 --- a/packages/app/types.ts +++ b/packages/app/types.ts @@ -180,6 +180,7 @@ export interface Profile { | "opted_in"; creator_token?: { address: `0x${string}`; + crossmint_id: string | null; id: number; }; } diff --git a/packages/app/types/environment.d.ts b/packages/app/types/environment.d.ts index 24d45e216c..a417fd3819 100644 --- a/packages/app/types/environment.d.ts +++ b/packages/app/types/environment.d.ts @@ -3,6 +3,7 @@ export {}; declare global { namespace NodeJS { interface ProcessEnv { + NEXT_PUBLIC_STAGE: "development" | "staging" | "production"; NEXT_PUBLIC_MAGIC_PUB_KEY: string; NEXT_PUBLIC_WEBSITE_DOMAIN: string; NEXT_PUBLIC_STRIPE_KEY: string; @@ -11,6 +12,7 @@ declare global { NEXT_PUBLIC_ALCHEMY_API_KEY: string; E2E: string; NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: string; + NEXT_PUBLIC_CROSSMINT_PROJECT_ID: string; } } interface Window {