Skip to content

Commit 225678d

Browse files
committed
Merge branch 'main' into greg/viem-ox
2 parents a9887a1 + a0835f7 commit 225678d

File tree

160 files changed

+4471
-1580
lines changed

Some content is hidden

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

160 files changed

+4471
-1580
lines changed

.changeset/cyan-shrimps-battle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Update implementations

.changeset/fair-planes-doubt.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
SDK: Fix chain switching in smart account transactions

.changeset/metal-mails-ring.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
- Add onClose callback to Connect Details modal
6+
7+
```tsx
8+
<ConnectButton
9+
detailsModal={{
10+
onClose: (screen: string) => {
11+
// The last screen name that was being shown when user closed the modal
12+
console.log({ screen });
13+
}
14+
}}
15+
/>
16+
```
17+
18+
- Small fix for ChainIcon: Always resolve IPFS URI
19+
20+
- Improve test coverage

.github/pull_request_template.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
## Problem solved
1+
---
2+
title: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
3+
---
24

3-
Short description of the bug fixed or feature added
5+
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
6+
7+
## Notes for the reviewer
8+
Anything important to call out? Be sure to also clarify these in your comments.
9+
10+
## How to test
11+
Unit tests, playground, etc.
412

.github/workflows/auto-assign.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
if: |
1414
github.event.pull_request.author_association == 'MEMBER' ||
1515
github.event.pull_request.author_association == 'OWNER' ||
16-
github.event.pull_request.author_association == 'COLLABORATOR'
16+
github.event.pull_request.author_association == 'COLLABORATOR' ||
17+
github.event.pull_request.author_association == 'CONTRIBUTOR'
1718
steps:
1819
- uses: toshimaru/[email protected]

.github/workflows/issue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [opened, edited, ready_for_review]
66

77
env:
8-
VALID_ISSUE_PREFIXES: "CORE|TOOL"
8+
VALID_ISSUE_PREFIXES: "CORE|TOOL|NEB|INFRA"
99

1010
jobs:
1111
linear:

.github/workflows/stale.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
steps:
1010
- uses: actions/stale@v9
1111
with:
12-
stale-issue-message: 'This issue has been inactive for 30 days. It is now marked as stale and will be closed in 5 days if no further activity occurs.'
13-
stale-pr-message: 'This PR has been inactive for 30 days. It is now marked as stale and will be closed in 5 days if no further activity occurs.'
12+
stale-issue-message: 'This issue has been inactive for 7 days. It is now marked as stale and will be closed in 2 days if no further activity occurs.'
13+
stale-pr-message: 'This PR has been inactive for 7 days. It is now marked as stale and will be closed in 2 days if no further activity occurs.'
1414
days-before-stale: 7
1515
days-before-close: 2

apps/dashboard/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
/// <reference types="next/navigation-types/compat/navigation" />
44

55
// NOTE: This file should not be edited
6-
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
6+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

apps/dashboard/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@marsidev/react-turnstile": "^1.1.0",
3232
"@n8tb1t/use-scroll-position": "^2.0.3",
3333
"@radix-ui/react-accordion": "^1.2.2",
34-
"@radix-ui/react-alert-dialog": "^1.1.3",
34+
"@radix-ui/react-alert-dialog": "^1.1.4",
3535
"@radix-ui/react-avatar": "^1.1.2",
3636
"@radix-ui/react-checkbox": "^1.1.3",
3737
"@radix-ui/react-dialog": "1.1.3",
@@ -95,7 +95,7 @@
9595
"sonner": "^1.7.1",
9696
"spdx-correct": "^3.2.0",
9797
"swagger-ui-react": "^5.18.2",
98-
"tailwind-merge": "^2.5.5",
98+
"tailwind-merge": "^2.6.0",
9999
"tailwindcss-animate": "^1.0.7",
100100
"thirdweb": "workspace:*",
101101
"tiny-invariant": "^1.3.3",
@@ -122,7 +122,7 @@
122122
"@types/papaparse": "^5.3.15",
123123
"@types/pluralize": "^0.0.33",
124124
"@types/qrcode": "^1.5.5",
125-
"@types/react": "19.0.1",
125+
"@types/react": "19.0.2",
126126
"@types/react-dom": "19.0.2",
127127
"@types/react-table": "^7.7.20",
128128
"@types/spdx-correct": "^3.1.3",

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

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { CurrencySelector } from "components/shared/CurrencySelector";
1818
import { SolidityInput } from "contract-ui/components/solidity-inputs";
1919
import { useTrack } from "hooks/analytics/useTrack";
2020
import { useAllChainsData } from "hooks/chains/allChains";
21+
import { useTxNotifications } from "hooks/useTxNotifications";
2122
import { isAlchemySupported } from "lib/wallet/nfts/alchemy";
2223
import { isMoralisSupported } from "lib/wallet/nfts/moralis";
2324
import { isSimpleHashSupported } from "lib/wallet/nfts/simpleHash";
@@ -125,6 +126,15 @@ export const CreateListingsForm: React.FC<CreateListingsFormProps> = ({
125126
walletAddress: account?.address,
126127
});
127128
const sendAndConfirmTx = useSendAndConfirmTransaction();
129+
const listingNotifications = useTxNotifications(
130+
"NFT listed Successfully",
131+
"Failed to list NFT",
132+
);
133+
134+
const auctionNotifications = useTxNotifications(
135+
"Auction created successfully",
136+
"Failed to create an auction",
137+
);
128138

129139
const form = useForm<ListForm>({
130140
defaultValues:
@@ -351,14 +361,11 @@ export const CreateListingsForm: React.FC<CreateListingsFormProps> = ({
351361
endTimestamp,
352362
});
353363

354-
const promise = sendAndConfirmTx.mutateAsync(transaction, {
364+
await sendAndConfirmTx.mutateAsync(transaction, {
355365
onSuccess: () => setOpen(false),
356366
});
357-
toast.promise(promise, {
358-
loading: "Listing NFT",
359-
success: "NFT listed successfully",
360-
error: "Failed to list NFT",
361-
});
367+
368+
listingNotifications.onSuccess();
362369
} else if (formData.listingType === "auction") {
363370
let minimumBidAmountWei: bigint;
364371
let buyoutBidAmountWei: bigint;
@@ -403,7 +410,7 @@ export const CreateListingsForm: React.FC<CreateListingsFormProps> = ({
403410
buyoutBidAmountWei: buyoutBidAmountWei * selectedQuantity,
404411
});
405412

406-
const promise = sendAndConfirmTx.mutateAsync(transaction, {
413+
await sendAndConfirmTx.mutateAsync(transaction, {
407414
onSuccess: () => {
408415
trackEvent({
409416
category: "marketplace",
@@ -423,15 +430,15 @@ export const CreateListingsForm: React.FC<CreateListingsFormProps> = ({
423430
});
424431
},
425432
});
426-
toast.promise(promise, {
427-
loading: "Creating auction",
428-
success: "Auction created successfully",
429-
error: "Failed to create auction",
430-
});
433+
auctionNotifications.onSuccess();
431434
}
432435
} catch (err) {
433436
console.error(err);
434-
toast.error("Failed to list NFT");
437+
if (formData.listingType === "auction") {
438+
auctionNotifications.onError(err);
439+
} else {
440+
listingNotifications.onError(err);
441+
}
435442
}
436443

437444
setIsFormLoading(false);

0 commit comments

Comments
 (0)