Skip to content

Commit e45c765

Browse files
committed
fix build
1 parent f045c89 commit e45c765

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.changeset/icy-eyes-show.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": minor
3+
---
4+
5+
Updates PayEmbed with refreshed UI and multi-step support

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/components/client/PayModal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export function PayModalButton(props: {
4444
payOptions={{
4545
onPurchaseSuccess(info) {
4646
if (
47-
info.type === "crypto" &&
48-
info.status.status !== "NOT_FOUND"
47+
info?.type === "crypto" &&
48+
info?.status.status !== "NOT_FOUND"
4949
) {
5050
trackEvent({
5151
category: "pay",
@@ -58,7 +58,7 @@ export function PayModalButton(props: {
5858
});
5959
}
6060

61-
if (info.type === "fiat" && info.status.status !== "NOT_FOUND") {
61+
if (info?.type === "fiat" && info.status.status !== "NOT_FOUND") {
6262
trackEvent({
6363
category: "pay",
6464
action: "buy",

apps/dashboard/src/app/pay/components/client/PayPageEmbed.client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function PayPageEmbed({
6363
onPurchaseSuccess: (result) => {
6464
if (!redirectUri) return;
6565
const url = new URL(redirectUri);
66-
switch (result.type) {
66+
switch (result?.type) {
6767
case "crypto": {
6868
url.searchParams.set("status", result.status.status);
6969
if (

apps/dashboard/src/components/buttons/MismatchButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export const MismatchButton = forwardRef<
293293
payOptions={{
294294
onPurchaseSuccess(info) {
295295
if (
296-
info.type === "crypto" &&
296+
info?.type === "crypto" &&
297297
info.status.status !== "NOT_FOUND"
298298
) {
299299
trackEvent({
@@ -308,7 +308,7 @@ export const MismatchButton = forwardRef<
308308
}
309309

310310
if (
311-
info.type === "fiat" &&
311+
info?.type === "fiat" &&
312312
info.status.status !== "NOT_FOUND"
313313
) {
314314
trackEvent({

0 commit comments

Comments
 (0)