Skip to content

Commit 5f9ec1a

Browse files
authored
Merge branch 'main' into greg/tool-2837-sdk-smart-accounts-use-6492-even-when-already-deployed
2 parents 7846be4 + 66f1337 commit 5f9ec1a

File tree

99 files changed

+994
-602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+994
-602
lines changed

.changeset/cyan-shrimps-battle.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/fair-planes-doubt.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/little-beds-dress.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/metal-mails-ring.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

.changeset/pink-gorillas-try.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/yellow-experts-sparkle.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

apps/dashboard/src/@/api/team.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export async function getTeams() {
6464
return null;
6565
}
6666

67-
type TeamNebulWaitList = {
67+
type TeamNebulaWaitList = {
6868
onWaitlist: boolean;
6969
createdAt: null | string;
7070
};
@@ -86,7 +86,7 @@ export async function getTeamNebulaWaitList(teamSlug: string) {
8686
);
8787

8888
if (res.ok) {
89-
return (await res.json()).result as TeamNebulWaitList;
89+
return (await res.json()).result as TeamNebulaWaitList;
9090
}
9191

9292
return null;

apps/dashboard/src/@/components/ui/button.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const AllVariants: Story = {
2020

2121
function Component() {
2222
return (
23-
<div className="flex min-h-screen flex-col gap-6 bg-background p-6 text-foregroun">
23+
<div className="flex min-h-screen flex-col gap-6 bg-background p-6 text-foreground">
2424
<Variants size="default" />
2525
<Variants size="sm" />
2626
<Variants size="icon" />
@@ -58,7 +58,7 @@ function Variants(props: {
5858
{props.size === "icon" ? (
5959
<StarIcon className="size-4" />
6060
) : (
61-
"Desctructive"
61+
"Destructive"
6262
)}
6363
</Button>
6464
</div>

apps/dashboard/src/@/components/ui/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const buttonVariants = cva(
1515
destructive:
1616
"bg-destructive hover:bg-destructive/90 text-semibold text-destructive-foreground ",
1717
outline:
18-
"border border-input bg-transaprent hover:bg-accent hover:text-accent-foreground text-semibold",
18+
"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground text-semibold",
1919
secondary:
2020
"bg-secondary hover:bg-secondary/80 text-semibold text-secondary-foreground ",
2121
ghost: "hover:bg-accent text-semibold hover:text-accent-foreground",

apps/dashboard/src/@/components/ui/select.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function randomName() {
3131

3232
function Component() {
3333
return (
34-
<div className="flex min-h-screen flex-col gap-10 bg-background p-6 text-foregroun">
34+
<div className="flex min-h-screen flex-col gap-10 bg-background p-6 text-foreground">
3535
<BadgeContainer label="5 items, no placeholder, no label, value filled">
3636
<SelectDemo listItems={5} selectFirst />
3737
</BadgeContainer>

apps/dashboard/src/@/constants/thirdweb.client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function useThirdwebClient(jwt?: string) {
3232
});
3333

3434
return useMemo(
35-
// prfer jwt from props over the one from the token query if it exists
35+
// prefer jwt from props over the one from the token query if it exists
3636
() => getThirdwebClient(jwt || query.data),
3737
[jwt, query.data],
3838
);

apps/dashboard/src/@/lib/DashboardRouter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function DashboardRouterTopProgressBarInner() {
100100
}
101101

102102
async function startEffect() {
103-
// if the loading state remains for atleast 500ms start the progress bar
103+
// if the loading state remains for at least 500ms start the progress bar
104104
await wait(500);
105105
if (isMounted) {
106106
updateProgressBar(0, 100);

apps/dashboard/src/@/styles/globals.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ body {
143143
min-height: 100%;
144144
}
145145

146-
/* Fix colors on autofilled inputs */
146+
/* Fix colors on auto-filled inputs */
147147
input:-webkit-autofill,
148148
input:-webkit-autofill:hover,
149149
input:-webkit-autofill:focus,

apps/dashboard/src/@3rdweb-sdk/react/hooks/useActivity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface InternalTransaction {
2222
export function useActivity(contract: ThirdwebContract, autoUpdate?: boolean) {
2323
const abiQuery = useResolveContractAbi(contract);
2424

25-
// Get all the PreprareEvents from the contract abis
25+
// Get all the Prepare Events from the contract abis
2626
const events: PreparedEvent<AbiEvent>[] = useMemo(() => {
2727
const eventsItems = (abiQuery.data || []).filter((o) => o.type === "event");
2828
const eventSignatures = eventsItems.map((event) => formatAbiItem(event));

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/add-chain-to-wallet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const AddChainToWallet: React.FC<AddChainToWalletProps> = (props) => {
4747
className="w-full gap-2"
4848
variant="outline"
4949
onClick={() => {
50-
// Connct directly to this chain
50+
// Connect directly to this chain
5151
if (!account) {
5252
return customConnectModal({ chain: props.chain });
5353
}

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/components/server/FaucetSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export async function FaucetSection(props: {
1212
}) {
1313
const { chain, twAccount } = props;
1414

15-
// Check eligibilty.
15+
// Check eligibility.
1616
const sanitizedChainName = chain.name.replace("Mainnet", "").trim();
1717
const amountToGive = getFaucetClaimAmount(props.chain.chainId);
1818

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/(chainPage)/layout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export default async function ChainPageLayout(props: {
162162
{/* Gas Sponsored badge - Mobile */}
163163
{chainMetadata?.gasSponsored && (
164164
<div className="flex md:hidden">
165-
<GasSponseredBadge />
165+
<GasSponsoredBadge />
166166
</div>
167167
)}
168168

@@ -182,7 +182,7 @@ export default async function ChainPageLayout(props: {
182182
{/* Gas Sponsored badge - Desktop */}
183183
{chainMetadata?.gasSponsored && (
184184
<div className="hidden md:block">
185-
<GasSponseredBadge />
185+
<GasSponsoredBadge />
186186
</div>
187187
)}
188188
</div>
@@ -221,7 +221,7 @@ export default async function ChainPageLayout(props: {
221221
);
222222
}
223223

224-
function GasSponseredBadge() {
224+
function GasSponsoredBadge() {
225225
return (
226226
<div className="flex items-center gap-2 rounded-full bg-[hsla(335,57%,51%,0.2)] px-2.5 py-1 text-[hsl(334,81.12%,69.65%)]">
227227
<TicketCheckIcon className="size-4" />

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-button.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { ListerOnly } from "@3rdweb-sdk/react/components/roles/lister-only";
1313
import type { Account } from "@3rdweb-sdk/react/hooks/useApi";
1414
import { isAlchemySupported } from "lib/wallet/nfts/alchemy";
1515
import { isMoralisSupported } from "lib/wallet/nfts/moralis";
16-
import { isSimpleHashSupported } from "lib/wallet/nfts/simpleHash";
16+
import { useSimplehashSupport } from "lib/wallet/nfts/simpleHash";
1717
import { PlusIcon } from "lucide-react";
1818
import { useState } from "react";
1919
import type { ThirdwebContract } from "thirdweb";
@@ -40,9 +40,12 @@ export const CreateListingButton: React.FC<CreateListingButtonProps> = ({
4040
const [open, setOpen] = useState(false);
4141
const [listingMode, setListingMode] =
4242
useState<(typeof LISTING_MODES)[number]>("Select NFT");
43+
44+
const simplehashQuery = useSimplehashSupport(contract.chain.id);
45+
4346
const isSupportedChain =
4447
contract.chain.id &&
45-
(isSimpleHashSupported(contract.chain.id) ||
48+
(simplehashQuery.data ||
4649
isAlchemySupported(contract.chain.id) ||
4750
isMoralisSupported(contract.chain.id));
4851
return (

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/components/list-form.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { useAllChainsData } from "hooks/chains/allChains";
2121
import { useTxNotifications } from "hooks/useTxNotifications";
2222
import { isAlchemySupported } from "lib/wallet/nfts/alchemy";
2323
import { isMoralisSupported } from "lib/wallet/nfts/moralis";
24-
import { isSimpleHashSupported } from "lib/wallet/nfts/simpleHash";
24+
import { useSimplehashSupport } from "lib/wallet/nfts/simpleHash";
2525
import type { WalletNFT } from "lib/wallet/nfts/types";
2626
import { CircleAlertIcon, InfoIcon } from "lucide-react";
2727
import Link from "next/link";
@@ -112,10 +112,10 @@ export const CreateListingsForm: React.FC<CreateListingsFormProps> = ({
112112
const { idToChain } = useAllChainsData();
113113
const network = idToChain.get(chainId);
114114
const [isFormLoading, setIsFormLoading] = useState(false);
115-
115+
const simplehashQuery = useSimplehashSupport(contract.chain.id);
116116
const isSupportedChain =
117117
chainId &&
118-
(isSimpleHashSupported(chainId) ||
118+
(!!simplehashQuery.data ||
119119
isAlchemySupported(chainId) ||
120120
isMoralisSupported(chainId));
121121

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const AccountsTable: React.FC<AccountsTableProps> = ({ contract }) => {
5151
const totalAccountsQuery = useReadContract(totalAccounts, { contract });
5252

5353
// the total size should never be more than max int size (that would be hella wallets!)
54-
// so converting the totalAccounts to a nunber should be safe here
54+
// so converting the totalAccounts to a number should be safe here
5555
const totalAccountsNum = useMemo(
5656
() => Number(totalAccountsQuery.data || 0),
5757
[totalAccountsQuery.data],

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/create-account-button.tsx

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
"use client";
22

33
import { Button } from "@/components/ui/button";
4-
import { Card } from "@/components/ui/card";
4+
import { ToolTipLabel } from "@/components/ui/tooltip";
55
import type { Account } from "@3rdweb-sdk/react/hooks/useApi";
6-
import { Tooltip } from "@chakra-ui/react";
76
import { TransactionButton } from "components/buttons/TransactionButton";
87
import type { ThirdwebContract } from "thirdweb";
98
import * as ERC4337Ext from "thirdweb/extensions/erc4337";
@@ -53,23 +52,11 @@ export const CreateAccountButton: React.FC<CreateAccountButtonProps> = ({
5352

5453
if (isAccountDeployedQuery.data && accountsForAddressQuery.data?.length) {
5554
return (
56-
<Tooltip
57-
label={
58-
<Card className="bg-card px-4 py-2">
59-
<p>You can only initialize one account per EOA.</p>
60-
</Card>
61-
}
62-
bg="transparent"
63-
boxShadow="none"
64-
bgColor="backgroundHighlight"
65-
borderRadius="lg"
66-
placement="right"
67-
shouldWrapChildren
68-
>
55+
<ToolTipLabel label="You can only initialize one account per EOA.">
6956
<Button variant="primary" disabled>
7057
Account Created
7158
</Button>
72-
</Tooltip>
59+
</ToolTipLabel>
7360
);
7461
}
7562

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default async function Layout(props: {
5252
// check if the contract exists
5353
const isValidContract = await isContractDeployed(contract).catch(() => false);
5454
if (!isValidContract) {
55-
// TODO - replace 404 with a better page to upsale deploy or other thirdweb products
55+
// TODO - replace 404 with a better page to upsell deploy or other thirdweb products
5656
notFound();
5757
}
5858
const contractPageMetadata = await getContractPageMetadata(contract);

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/nft/AdvancedNFTMetadataFormGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export function AdvancedNFTMetadataFormGroup<
8282
<Input {...field} />
8383
</FormControl>
8484
<FormDescription>
85-
If you already have your NFT Animation URL preuploaded, you can
85+
If you already have your NFT Animation URL pre-uploaded, you can
8686
set the URL or URI here.
8787
</FormDescription>
8888
<FormMessage />

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/claim-tab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const ClaimTabERC1155: React.FC<ClaimTabProps> = ({
5959
if (approveTx) {
6060
const approvalPromise = sendAndConfirmTx.mutateAsync(approveTx);
6161
toast.promise(approvalPromise, {
62-
success: "Approved succesfully",
62+
success: "Approved successfully",
6363
error: "Failed to approve ERC20",
6464
});
6565
await approvalPromise;

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/[tokenId]/components/update-metadata-form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ export const UpdateNftMetadata: React.FC<UpdateNftMetadataForm> = ({
361361
<FormLabel>Image URL</FormLabel>
362362
<Input max="6" {...register("customImage")} />
363363
<FormHelperText>
364-
If you already have your NFT image preuploaded, you can set the
364+
If you already have your NFT image pre-uploaded, you can set the
365365
URL or URI here.
366366
</FormHelperText>
367367
<FormErrorMessage>
@@ -372,7 +372,7 @@ export const UpdateNftMetadata: React.FC<UpdateNftMetadataForm> = ({
372372
<FormLabel>Animation URL</FormLabel>
373373
<Input max="6" {...register("customAnimationUrl")} />
374374
<FormHelperText>
375-
If you already have your NFT Animation URL preuploaded, you can
375+
If you already have your NFT Animation URL pre-uploaded, you can
376376
set the URL or URI here.
377377
</FormHelperText>
378378
<FormErrorMessage>

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/lazy-mint-form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ export const LazyMintNftForm: React.FC<LazyMintNftFormParams> = ({
294294
<FormLabel>Image URL</FormLabel>
295295
<Input max="6" {...register("customImage")} />
296296
<FormHelperText>
297-
If you already have your NFT image preuploaded, you can set
297+
If you already have your NFT image pre-uploaded, you can set
298298
the URL or URI here.
299299
</FormHelperText>
300300
<FormErrorMessage>
@@ -305,7 +305,7 @@ export const LazyMintNftForm: React.FC<LazyMintNftFormParams> = ({
305305
<FormLabel>Animation URL</FormLabel>
306306
<Input max="6" {...register("customAnimationUrl")} />
307307
<FormHelperText>
308-
If you already have your NFT Animation URL preuploaded, you
308+
If you already have your NFT Animation URL pre-uploaded, you
309309
can set the URL or URI here.
310310
</FormHelperText>
311311
<FormErrorMessage>

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/mint-form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ export const NFTMintForm: React.FC<NFTMintForm> = ({
317317
<FormLabel>Image URL</FormLabel>
318318
<Input max="6" {...register("customImage")} />
319319
<FormHelperText>
320-
If you already have your NFT image preuploaded, you can set
320+
If you already have your NFT image pre-uploaded, you can set
321321
the URL or URI here.
322322
</FormHelperText>
323323
<FormErrorMessage>
@@ -328,7 +328,7 @@ export const NFTMintForm: React.FC<NFTMintForm> = ({
328328
<FormLabel>Animation URL</FormLabel>
329329
<Input max="6" {...register("customAnimationUrl")} />
330330
<FormHelperText>
331-
If you already have your NFT Animation URL preuploaded, you
331+
If you already have your NFT Animation URL pre-uploaded, you
332332
can set the URL or URI here.
333333
</FormHelperText>
334334
<FormErrorMessage>

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/reveal-button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export const NFTRevealButton: React.FC<NFTRevealButtonProps> = ({
7070
);
7171
}
7272

73-
return batchesQuery.data?.length ? (
73+
return (
7474
<MinterOnly contract={contract}>
7575
<Sheet open={open} onOpenChange={setOpen}>
7676
<SheetTrigger asChild>
@@ -168,5 +168,5 @@ export const NFTRevealButton: React.FC<NFTRevealButtonProps> = ({
168168
</SheetContent>
169169
</Sheet>
170170
</MinterOnly>
171-
) : null;
171+
);
172172
};

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/nfts/components/shared-metadata-form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export const SharedMetadataForm: React.FC<{
247247
<FormLabel>Image URL</FormLabel>
248248
<Input max="6" {...register("customImage")} />
249249
<FormHelperText>
250-
If you already have your NFT image preuploaded, you can set
250+
If you already have your NFT image pre-uploaded, you can set
251251
the URL or URI here.
252252
</FormHelperText>
253253
<FormErrorMessage>
@@ -258,7 +258,7 @@ export const SharedMetadataForm: React.FC<{
258258
<FormLabel>Animation URL</FormLabel>
259259
<Input max="6" {...register("customAnimationUrl")} />
260260
<FormHelperText>
261-
If you already have your NFT Animation URL preuploaded, you
261+
If you already have your NFT Animation URL pre-uploaded, you
262262
can set the URL or URI here.
263263
</FormHelperText>
264264
<FormErrorMessage>

0 commit comments

Comments
 (0)