Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/chilled-buses-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@thirdweb-dev/react": patch
---

Remove const enums to object to fix issues with Next.js <13.5
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ interface VerifyOwnershipWithPaperProps {
clientId?: string;
}

const enum VERIFY_OWNERSHIP_WITH_PAPER_EVENT_TYPE {
USER_LOGIN_SUCCESS = "userLoginSuccess",
USER_LOGIN_FAILED = "userLoginFailed",
USER_CLOSE_LOGIN_PAGE = "userCloseLoginPage",
}
const VERIFY_OWNERSHIP_WITH_PAPER_EVENT_TYPE = {
USER_LOGIN_SUCCESS: "userLoginSuccess",
USER_LOGIN_FAILED: "userLoginFailed",
USER_CLOSE_LOGIN_PAGE: "userCloseLoginPage",
} as const;

export const VerifyOwnershipWithPaper: React.FC<
VerifyOwnershipWithPaperProps
Expand Down
16 changes: 9 additions & 7 deletions packages/react/src/payments/interfaces/WalletTypes.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// UNCHANGED
export const enum WalletType {
Preset = "Preset",
MetaMask = "metaMask",
CoinbaseWallet = "coinbaseWallet",
WalletConnect = "walletConnect",
Phantom = "Phantom",
}
const WalletTypeObj = {
Preset: "Preset",
MetaMask: "metaMask",
CoinbaseWallet: "coinbaseWallet",
WalletConnect: "walletConnect",
Phantom: "Phantom",
} as const;

export type WalletType = (typeof WalletTypeObj)[keyof typeof WalletTypeObj];

export interface ConnectWalletProps {
onWalletConnected: onWalletConnectedType;
Expand Down