Skip to content

Commit

Permalink
merge: staging
Browse files Browse the repository at this point in the history
  • Loading branch information
robhyrk committed Mar 2, 2024
2 parents 4f8847a + b7abe4f commit 188a724
Show file tree
Hide file tree
Showing 122 changed files with 3,209 additions and 2,239 deletions.
13 changes: 10 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@ NEXT_PUBLIC_SITE_URL=http://localhost:3000
# disable grillchat
NEXT_PUBLIC_GRILLCHAT_DISABLE=true

# web3auth client id
NEXT_PUBLIC_WEB3AUTH_CLIENT_ID_ZTG=BHyRKGUvkWeDLXdLO1FBFZDqLtSMPuDN-zMWN1_Yb9KMZKWriIu-7ZxMBPBT72P-ER6FH_a-rlesWwY8Vgm0fjg
# web3auth
NEXT_PUBLIC_WEB3AUTH_CLIENT_ID=
NEXT_PUBLIC_AUTH0_CLIENT_ID=
NEXT_PUBLIC_DISCORD_CLIENT_ID=
NEXT_PUBLIC_AUTH0_DOMAIN=

NEXT_PUBLIC_OTHER_TAGS=["Coindesk"]

NEXT_PUBLIC_COIN_GECKO_API_KEY=
COIN_GECKO_API_KEY=

# sanity cms config
NEXT_PUBLIC_SANITY_PROJECT_ID="4wbnjof1"
Expand All @@ -55,3 +58,7 @@ NEXT_PUBLIC_SANITY_VERSION="2022-03-07"
# enable topics
NEXT_PUBLIC_SHOW_TOPICS=true

# whitelisted creators of trusted markets
# note: should be addresses of official zeitgeist markets or trusted third party creators.
NEXT_PUBLIC_WHITELISTED_TRUSTED_CREATORS=["xxxxxx"]

2 changes: 1 addition & 1 deletion components/account/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const Account = () => {
<Modal open={walletSelectModalOpen} onClose={closeWalletSelect}>
<Dialog.Panel
className="
w-full max-w-[564px] rounded-ztg-10 bg-white p-[15px]"
w-full max-w-[450px] rounded-lg bg-white p-8"
>
<WalletSelect />
</Dialog.Panel>
Expand Down
37 changes: 11 additions & 26 deletions components/account/AccountButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { useUserLocation } from "lib/hooks/useUserLocation";
import { useWallet } from "lib/state/wallet";
import { formatNumberLocalized, shortenAddress } from "lib/util";
import { FaNetworkWired } from "react-icons/fa";

import Link from "next/link";
import { useRouter } from "next/router";
import React, { FC, Fragment, PropsWithChildren, useState } from "react";
Expand All @@ -27,10 +26,7 @@ import {
User,
} from "react-feather";
import { useChainConstants } from "../../lib/hooks/queries/useChainConstants";
import {
DesktopOnboardingModal,
MobileOnboardingModal,
} from "./OnboardingModal";
import { DesktopOnboardingModal } from "./OnboardingModal";
import SettingsModal from "components/settings/SettingsModal";
import CopyIcon from "../ui/CopyIcon";

Expand Down Expand Up @@ -89,6 +85,7 @@ const AccountButton: FC<{
isNovaWallet,
getProxyFor,
realAddress,
walletId,
} = useWallet();
const proxy = getProxyFor(activeAccount?.address);

Expand All @@ -106,11 +103,6 @@ const AccountButton: FC<{

const { data: constants } = useChainConstants();

const isMobileDevice =
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
navigator.userAgent,
);

const connect = async () => {
if (isNovaWallet) {
selectWallet("polkadot-js");
Expand Down Expand Up @@ -342,7 +334,9 @@ const AccountButton: FC<{
<div
className="mb-3 flex items-center px-6 hover:bg-slate-100"
onClick={() => {
accountModals.openAccountSelect();
walletId === "web3auth"
? accountModals.openWalletSelect()
: accountModals.openAccountSelect();
}}
>
<User />
Expand Down Expand Up @@ -415,23 +409,14 @@ const AccountButton: FC<{
setShowSettingsModal(false);
}}
/>
{isMobileDevice ? (
<>
<Modal open={showOnboarding} onClose={() => setShowOnboarding(false)}>
<MobileOnboardingModal />
<DesktopOnboardingModal />
</Modal>
) : (
<>
<Modal open={showOnboarding} onClose={() => setShowOnboarding(false)}>
<DesktopOnboardingModal />
</Modal>
<Modal
open={showGetZtgModal}
onClose={() => setShowGetZtgModal(false)}
>
<DesktopOnboardingModal step={4} />
</Modal>
</>
)}
<Modal open={showGetZtgModal} onClose={() => setShowGetZtgModal(false)}>
<DesktopOnboardingModal step={4} />
</Modal>
</>
</>
);
};
Expand Down
1 change: 0 additions & 1 deletion components/account/AccountModalContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { useChainConstants } from "lib/hooks/queries/useChainConstants";
const AccountModalContent: FC = () => {
const { activeAccount, disconnectWallet, accounts, selectAccount } =
useWallet();

const { data: activeBalance } = useZtgBalance(activeAccount?.address);
const { data: constants } = useChainConstants();

Expand Down
4 changes: 1 addition & 3 deletions components/account/AccountSelect.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Unpacked } from "@zeitgeistpm/utility/dist/array";
import { useWallet } from "lib/state/wallet";

import React, { FC, useEffect, useMemo, useState } from "react";
import React, { FC } from "react";
import Select, {
components,
ControlProps,
Expand All @@ -14,7 +13,6 @@ import Select, {
import CopyIcon from "../ui/CopyIcon";
import AccountSelectOption from "./AccountSelectOption";
import AccountSelectValue from "./AccountSelectValue";
import { useAccountModals } from "lib/state/account";

export type AccountOption = { label: string; value: string };

Expand Down
Loading

0 comments on commit 188a724

Please sign in to comment.