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AAIL,UAAU,0FAAgF,gBAE7F,GAAAG,EAAAI,GAAA,EAACmM,KAAAA,CAAAA,GAAK,oBAGR,GAAAvM,EAAAI,GAAA,EAACF,MAAAA,CAAIL,UAAU,wEACf,GAAAG,EAAAI,GAAA,EAACF,MAAAA,CAAIL,UAAU,mEAA0D,qNAKzE,GAAAG,EAAAI,GAAA,EAACoM,EAAUA,CACTjM,kBAAmB,GACnB8B,cAAY,sBACZoK,QAASrB,EACTvL,UAAU,2BACV6M,UAAW7C,EACX8C,SAAUpB,EACV/K,QACE,8BAAImJ,EACK,sBACEA,gCAAAA,EACF,yBACEA,6BAAAA,EACF,0CAKf,GAAA3J,EAAAI,GAAA,EAACF,MAAAA,CAAIL,UAAU,yCACb,GAAAG,EAAAI,GAAA,EAACiB,EAAYA,CAACC,SA7FyB,CACjDW,KAAM,cACNa,YAAa,0DACbN,eAAgB,MAChBC,aAAc,EACdb,KAAM,kCACNgL,eAAgB,gBAClB,EAsF6D/M,UAAU,qBAG/D,GAAAG,EAAAI,GAAA,EAACiF,EAAYA,CAACxF,UAAU,8BAE1B,GAAAG,EAAAI,GAAA,EAACyM,EAAAA,CAAMA,CAAAA,CAAAA,OAIf","sources":["webpack://_N_E/./src/components/PageRoot.tsx","webpack://_N_E/./src/components/SIWEButton.tsx","webpack://_N_E/./src/components/components_staking/PlatformCard.tsx","webpack://_N_E/./src/components/components_staking/TosModal.tsx","webpack://_N_E/./src/components/StatsSection.tsx","webpack://_N_E/./src/pages/signin.tsx","webpack://_N_E/"],"sourcesContent":["import React from \"react\";\nimport { Backdrop } from \"./components_staking/Backdrop\";\n\ntype BackgroundGradientStyle = \"top-only\" | \"top-and-side\";\n\nconst PageRoot = ({\n children,\n className,\n backgroundGradientStyle = \"top-and-side\",\n}: {\n children: React.ReactNode;\n className?: string;\n backgroundGradientStyle?: BackgroundGradientStyle;\n}) => (\n
\n \n
\n {backgroundGradientStyle === \"top-and-side\" ? (\n
{children}
\n ) : (\n children\n )}\n
\n
\n);\n\nexport default PageRoot;\n","import React from \"react\";\nimport { LoadButton, LoadingButtonProps } from \"./LoadButton\";\n\nconst SIWEButton = (props: LoadingButtonProps & { enableEthBranding: boolean }) => {\n const { enableEthBranding, subtext, ...rest } = props;\n return (\n \n {enableEthBranding && (\n \n \n \n \n \n \n \n \n )}\n
\n Loading...\n {/* \n Sign in {enableEthBranding ? \"with Ethereum\" : \"using signature\"}\n */}\n Connect Wallet\n
({subtext})
\n
\n
\n );\n};\n\nexport default SIWEButton;\n","// --- React Methods\nimport { useState } from \"react\";\nimport { useRouter } from \"next/router\";\n\n// --- Components\nimport { Button } from \"../Button\";\n\nexport type PlatformScoreSpec = {\n icon?: string | undefined;\n name: string;\n description: string;\n connectMessage: string;\n isEVM?: boolean;\n enablePlatformCardUpdate?: boolean;\n website?: string;\n possiblePoints: number;\n earnedPoints: number;\n};\n\nexport type PlatformCardProps = {\n platform: PlatformScoreSpec;\n className?: string;\n};\n\nexport const PlatformCard = ({ platform, className }: PlatformCardProps): JSX.Element => {\n // import all providers\n const [hovering, setHovering] = useState(false);\n const verified = false;\n\n const platformClasses = verified\n ? \"border-foreground-5 text-foreground-5 override-text-color\"\n : \"border-foreground-6 bg-gradient-to-t from-background2 to-background8\";\n\n const imgFilter = {};\n\n // returns a single Platform card\n return (\n
\n setHovering(true)}\n onMouseLeave={() => setHovering(false)}\n className={`group relative flex h-full flex-col rounded-lg border p-0 transition-all ease-out hover:shadow-even-md ${platformClasses}`}\n >\n
\n
\n {platform.icon ? (\n
\n {platform.name}\n
\n ) : (\n \n \n \n )}\n
\n

\n {Math.max(platform.possiblePoints - platform.earnedPoints, 0).toFixed(2)}\n

\n

Available Points

\n
\n
\n\n
\n 1 ? \"items-center md:items-baseline\" : \"items-center\"\n }`}\n >\n 1 ? \"text-left\" : \"text-center\"}`}\n >\n {platform.name}\n \n
\n
\n
\n \n \n );\n};\n","import React, { useState } from \"react\";\nimport { StakeModal } from \"./StakeModal\";\n\nexport const TosModal = ({\n isPending,\n isOpen,\n onClose,\n onButtonClick,\n buttonDisabled,\n}: {\n isPending: boolean;\n isOpen: boolean;\n onClose: () => void;\n onButtonClick: () => void;\n buttonDisabled?: boolean;\n}) => {\n const terms = [\n <>\n I understand that I may be slashed for what is deemed Sybil behavior when using Passport. Slashing criteria will\n continue to evolve over time.{\" \"}\n \n Learn more about slashing conditions.\n \n ,\n <>\n I understand that credentials/Stamps may be verified on multiple Passports (i.e., the same Google account can be\n verified on two wallets), BUT those wallets should never be submitted to the same application.{\" \"}\n \n Learn more about Passport Stamps and wallets.\n \n ,\n <>\n I have read, understand, and agree to the{\" \"}\n \n Terms and Conditions of Passport's Identity Staking.\n \n ,\n ];\n\n const [acceptedTerms, setAcceptedTerms] = useState(terms.map(() => false));\n const termsCheckBoxes = terms.map((t, index) => (\n \n ));\n const allTermsAccepted = acceptedTerms.every((t) => t);\n return (\n \n
\n Before Staking Your Identity, Please Agree to the Following:\n
{termsCheckBoxes}
\n Please note: All three boxes must be checked to enable the "Proceed" button and continue to the\n app.\n
\n \n );\n};\n","/* eslint-disable react-hooks/exhaustive-deps, @next/next/no-img-element */\n// --- React Methods\nimport React from \"react\";\n\n// --- Components\n\nconst GtcIcon = () => (\n \n \n \n \n);\n\nconst StakersIcon = () => (\n \n \n \n \n);\n\nconst StampsIcon = () => (\n \n \n \n);\n\nexport const StatsSection = ({ className }: { className?: string }) => (\n \n {[\n { title: \"GTC Staked\", value: \"1.5M+\", icon: },\n { title: \"Stakers\", value: \"123K+\", icon: },\n { title: \"Passport Stamps\", value: \"100K+\", icon: },\n ].map(({ title, value, icon }) => (\n \n
{title}
\n
\n
{icon}
\n
{value}
\n
\n \n ))}\n \n);\n","/* eslint-disable react-hooks/exhaustive-deps, @next/next/no-img-element */\n// --- React Methods\nimport React, { useEffect, useState, useMemo, useCallback, useRef } from \"react\";\nimport { useAccount, useConnect, useConnectors, useDisconnect, useSignMessage, useWalletClient } from \"wagmi\";\nimport axios from \"axios\";\n\n// --- Components\nimport PageRoot from \"../components/PageRoot\";\nimport SIWEButton from \"../components/SIWEButton\";\nimport Footer from \"../components/components_staking/Footer\";\nimport { useDatastoreConnectionContext } from \"../context/datastoreConnectionContext\";\nimport { useToast } from \"@chakra-ui/react\";\nimport { DoneToastContent, makeErrorToastProps } from \"../components/DoneToastContent\";\nimport { PlatformCard, PlatformScoreSpec } from \"../components/components_staking/PlatformCard\";\nimport { TosModal } from \"../components/components_staking/TosModal\";\nimport { useMutation, useQuery, DefaultError, useQueryClient } from \"@tanstack/react-query\";\nimport { useNavigateWithCommonParams } from \"@/hooks/hooks_staking/useNavigateWithCommonParams\";\nimport { useWeb3Modal, useWeb3ModalState } from \"@web3modal/wagmi/react\";\nimport { isServerOnMaintenance } from \"@/utils/helpers\";\nimport { AccountCenter } from \"@/components/AccountCenter\";\nimport { StatsSection } from \"@/components/StatsSection\";\n\nconst SIGN_IN_CONTENT_MAX_WIDTH = \"max-w-[1100px]\";\n\nexport const useTosQueryKey = (address: string | undefined): string[] => {\n return useMemo(() => [\"tos\", address || \"\"], [address]);\n};\nexport const useTosMessageQueryKey = (address: string | undefined): string[] => {\n return useMemo(() => [\"tos-message\", address || \"\"], [address]);\n};\n\ntype TosAccepted = {\n accepted: boolean;\n};\n\ntype TosMessageToSign = {\n text: string;\n nonce: string;\n};\n\ntype TosSignedMessage = {\n tos_type: string;\n nonce: string;\n signature: string;\n};\n\nexport const useTosQuery = (address: string | undefined) => {\n const { dbAccessToken, dbAccessTokenStatus } = useDatastoreConnectionContext();\n const queryKey = useTosQueryKey(address);\n return useQuery({\n queryKey,\n queryFn: async (): Promise => {\n const response = await axios.get(\n `${process.env.NEXT_PUBLIC_SCORER_ENDPOINT}/ceramic-cache/tos/accepted/IST/${address}`,\n {\n headers: {\n Authorization: `Bearer ${dbAccessToken}`,\n },\n }\n );\n return response.data as TosAccepted;\n },\n enabled: Boolean(address) && dbAccessTokenStatus === \"connected\",\n });\n};\n\nexport const useTosGetMessageQuery = (address: string | undefined, accepted?: boolean) => {\n const { dbAccessToken, dbAccessTokenStatus } = useDatastoreConnectionContext();\n const queryKey = useTosMessageQueryKey(address);\n return useQuery({\n queryKey,\n queryFn: async (): Promise => {\n const response = await axios.get(\n `${process.env.NEXT_PUBLIC_SCORER_ENDPOINT}/ceramic-cache/tos/message-to-sign/IST/${address}`,\n {\n headers: {\n Authorization: `Bearer ${dbAccessToken}`,\n },\n }\n );\n return response.data as TosMessageToSign;\n },\n enabled: !accepted && Boolean(address) && dbAccessTokenStatus === \"connected\",\n });\n};\n\nexport const useTosAcceptMutation = (address?: string) => {\n const { dbAccessToken } = useDatastoreConnectionContext();\n return useMutation({\n mutationFn: async (tosSigned: TosSignedMessage) => {\n console.log(\"Saving signature ...\");\n await axios.post(\n `${process.env.NEXT_PUBLIC_SCORER_ENDPOINT}/ceramic-cache/tos/signed-message/IST/${address}`,\n tosSigned,\n {\n headers: {\n Authorization: `Bearer ${dbAccessToken}`,\n },\n }\n );\n },\n });\n};\n\nconst useTos = () => {\n const { address } = useAccount();\n const tosCheck = useTosQuery(address);\n const tosMessageToSign = useTosGetMessageQuery(address, tosCheck.data?.accepted);\n const signer = useSignMessage();\n const acceptTos = useTosAcceptMutation(address);\n const isTosAccepted = tosCheck.isFetched && tosCheck.data?.accepted;\n const queryClient = useQueryClient();\n const tosQueryKey = useTosQueryKey(address);\n const toast = useToast();\n const [isSigning, setIsSigning] = useState(false);\n\n useEffect(() => {\n if (tosMessageToSign.isError) {\n toast(\n makeErrorToastProps(\n \"Error getting TOS to sign\",\n
\n

{tosMessageToSign.error.message}

\n

Please try again ...

\n
\n )\n );\n }\n }, [tosMessageToSign.isError, tosMessageToSign.error]);\n\n useEffect(() => {\n if (tosCheck.isError) {\n toast(\n makeErrorToastProps(\n \"Error checking TOS acceptance\",\n
\n

{tosCheck.error.message}

\n

Please try again ...

\n
\n )\n );\n }\n }, [tosCheck.isError, tosCheck.error]);\n\n useEffect(() => {\n if (acceptTos.isError) {\n toast(\n makeErrorToastProps(\n \"Error saving TOS acceptance signature\",\n
\n

{acceptTos.error.message}

\n

Please try again ...

\n
\n )\n );\n }\n }, [acceptTos.isError, acceptTos.error]);\n\n useEffect(() => {\n if (signer.isError) {\n console.log(\"signer errors: \", signer.error);\n const cause = signer.error?.cause as Error;\n toast(\n makeErrorToastProps(\n `Error saving TOS acceptance signature: ${signer.error?.name}`,\n
\n

{cause?.message || signer.error?.message}

\n

Please try again ...

\n
\n )\n );\n }\n }, [signer.isError, signer.error]);\n\n const onAcceptTos = useCallback(async () => {\n console.log(\"accepting tos ...\", tosMessageToSign.data);\n setIsSigning(true);\n if (tosMessageToSign.data) {\n try {\n const signature = await signer.signMessageAsync({ message: tosMessageToSign.data.text });\n await acceptTos.mutateAsync({\n tos_type: \"IST\",\n nonce: tosMessageToSign.data.nonce,\n signature: signature,\n });\n queryClient.invalidateQueries({ queryKey: tosQueryKey });\n } catch (error) {\n console.error(\"Error: \", error);\n }\n } else {\n console.error(\"tosMessageToSign.data is undefined\");\n }\n setIsSigning(false);\n }, [tosMessageToSign.data, acceptTos, signer, queryClient, tosQueryKey]);\n\n return useMemo(\n () => ({ isTosAccepted, onAcceptTos, isPendingCheck: tosCheck.isPending || isSigning }),\n [isTosAccepted, onAcceptTos, tosCheck.isPending, isSigning]\n );\n};\n\ntype LoginStep =\n | \"NOT_STARTED\"\n | \"PENDING_WALLET_CONNECTION\"\n | \"PENDING_DATABASE_CONNECTION\"\n | \"PENDING_TOS_VERIFICATION\"\n | \"DONE\";\n\n// Isolate login status updates and some workaround logic for web3modal\nconst useLoginFlow = ({\n isTosAccepted,\n}: {\n isTosAccepted?: boolean;\n}): {\n loginStep: LoginStep;\n isLoggingIn: boolean;\n initiateLogin: () => void;\n resetLogin: () => void;\n} => {\n const { isConnected } = useAccount();\n const { dbAccessTokenStatus } = useDatastoreConnectionContext();\n const { open: web3ModalIsOpen } = useWeb3ModalState();\n const [web3modalWasOpen, setWeb3modalWasOpen] = useState(false);\n const { disconnect } = useDisconnect();\n const [enabled, setEnabled] = useState(false);\n const [loginStep, setLoginStep] = useState(\"NOT_STARTED\");\n\n useEffect(() => {\n const loginStep = (() => {\n // Stop login if web3modal was closed\n if (web3modalWasOpen && !web3ModalIsOpen && !isConnected) {\n setEnabled(false);\n return \"NOT_STARTED\";\n }\n\n if (!enabled) return \"NOT_STARTED\";\n else if (!isConnected) return \"PENDING_WALLET_CONNECTION\";\n else if (dbAccessTokenStatus !== \"connected\") return \"PENDING_DATABASE_CONNECTION\";\n else if (!isTosAccepted) return \"PENDING_TOS_VERIFICATION\";\n else return \"DONE\";\n })();\n setLoginStep(loginStep);\n }, [enabled, isConnected, dbAccessTokenStatus, isTosAccepted, web3ModalIsOpen, web3modalWasOpen]);\n\n // It takes a couple render cycles for web3ModalIsOpen to\n // be updated, so we need to keep track of the previous state\n useEffect(() => {\n setWeb3modalWasOpen(web3ModalIsOpen);\n }, [web3ModalIsOpen]);\n\n // Workaround for bug where if you disconnect from the modal on\n // the dashboard, the web3ModalIsOpen state is incorrect\n // until we call disconnect\n useEffect(() => {\n if (web3ModalIsOpen && loginStep === \"NOT_STARTED\") {\n disconnect();\n }\n }, [web3ModalIsOpen, loginStep]);\n\n const isLoggingIn = loginStep !== \"DONE\" && loginStep !== \"NOT_STARTED\";\n\n const initiateLogin = useCallback(() => {\n setEnabled(true);\n }, []);\n\n const resetLogin = useCallback(() => {\n setEnabled(false);\n }, []);\n\n return useMemo(\n () => ({ loginStep, isLoggingIn, initiateLogin, resetLogin }),\n [loginStep, isLoggingIn, initiateLogin, resetLogin]\n );\n};\n\n// Once we are out of the beta, we can rename this to Home and delete the above\nexport default function Home() {\n const { isConnected, address } = useAccount();\n const { open: openWeb3Modal } = useWeb3Modal();\n const { connect: connectDatastore } = useDatastoreConnectionContext();\n const { data: walletClient } = useWalletClient();\n const toast = useToast();\n const [tosModalIsOpen, setTosModalIsOpen] = useState(false);\n const isConnectingToDatabaseRef = useRef(false);\n const navigate = useNavigateWithCommonParams();\n\n const { isPendingCheck, isTosAccepted, onAcceptTos } = useTos();\n\n const { loginStep, isLoggingIn, initiateLogin, resetLogin } = useLoginFlow({ isTosAccepted });\n\n const showConnectionError = useCallback(\n (e: any) => {\n toast({\n duration: 6000,\n isClosable: true,\n render: (result: any) => (\n \n ),\n });\n },\n [toast]\n );\n\n useEffect(() => {\n if (loginStep === \"DONE\") {\n navigate(\"/home\");\n }\n }, [loginStep, navigate]);\n\n useEffect(() => {\n if (loginStep === \"PENDING_TOS_VERIFICATION\" && !isPendingCheck && !isTosAccepted) {\n setTosModalIsOpen(true);\n }\n }, [loginStep, isPendingCheck, isTosAccepted]);\n\n const signIn = useCallback(async () => {\n try {\n initiateLogin();\n if (!isConnected) {\n await openWeb3Modal();\n }\n } catch (e) {\n console.error(\"Error connecting wallet\", e);\n showConnectionError(e);\n resetLogin();\n }\n }, [openWeb3Modal, isConnected, showConnectionError]);\n\n useEffect(() => {\n (async () => {\n if (\n !isConnectingToDatabaseRef.current &&\n loginStep === \"PENDING_DATABASE_CONNECTION\" &&\n address &&\n walletClient\n ) {\n isConnectingToDatabaseRef.current = true;\n console.log(\"Connecting to database\");\n try {\n await connectDatastore(address, walletClient);\n } catch (e) {\n console.error(\"Error connecting to database\", e);\n showConnectionError(e);\n resetLogin();\n }\n isConnectingToDatabaseRef.current = false;\n }\n })();\n }, [loginStep, address, walletClient, connectDatastore, showConnectionError]);\n\n const closeTosModal = useCallback(() => {\n setTosModalIsOpen(false);\n resetLogin();\n }, []);\n\n const gtcStakingStampPlatform: PlatformScoreSpec = {\n name: \"GTC Staking\",\n description: \"Stake GTC to boost your trust in the Gitcoin ecosystem.\",\n possiblePoints: 14.18,\n earnedPoints: 0,\n icon: \"./assets/gtcStakingLogoIcon.svg\",\n connectMessage: \"Connect Wallet\",\n };\n\n const maintenanceMode = useMemo(isServerOnMaintenance, []);\n\n return (\n \n
\n {isConnected && }\n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n\n
\n
\n
\n Increase Your\n
\n Passport Score\n
\n
\n
\n Increase your Passport’s Cost of Forgery while also increasing your Unique Humanity Score. Staking GTC\n allows real humans to attest to their unique humanity and builds financial incentives to be a good\n actor.\n
\n {\n if (loginStep === \"PENDING_WALLET_CONNECTION\") {\n return \"Connect your wallet\";\n } else if (loginStep === \"PENDING_DATABASE_CONNECTION\") {\n return \"Sign message in wallet\";\n } else if (loginStep === \"PENDING_TOS_VERIFICATION\") {\n return \"Accept the terms of service\";\n }\n })()}\n />\n
\n
\n \n
\n
\n \n
\n