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
7 changes: 7 additions & 0 deletions .changeset/nice-numbers-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@relayprotocol/relay-design-system': major
'@relayprotocol/relay-kit-hooks': major
'@relayprotocol/relay-kit-ui': major
---

Upgrade to React 19
8 changes: 4 additions & 4 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@
"next": "latest",
"next-remote-watch": "^1.0.0",
"next-themes": "^0.2.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"usehooks-ts": "^3.1.0",
"viem": ">=2.26.0",
"wagmi": "^2.15.6"
},
"devDependencies": {
"@dynamic-labs/types": "4.10.4",
"@types/node": "^12.12.21",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"typescript": "5.4.5"
}
}
5 changes: 3 additions & 2 deletions demo/pages/ui/chain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ const ChainWidgetPage: NextPage = () => {
const { setWalletFilter } = useWalletFilter()
const _switchWallet = useSwitchWallet()
const userWallets = useUserWallets()
const wallets = useRef<Wallet<any>[]>()
const switchWallet = useRef<(walletId: string) => Promise<void>>()
const wallets = useRef<Wallet<any>[]>([])
const switchWallet =
useRef<(walletId: string) => Promise<void> | undefined>(undefined)
const [wallet, setWallet] = useState<AdaptedWallet | undefined>()
const [linkWalletPromise, setLinkWalletPromise] = useState<
| {
Expand Down
2 changes: 1 addition & 1 deletion demo/pages/ui/onramp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const OnrampPage: NextPage = () => {
const { setShowAuthFlow } = useDynamicContext()
const { setShowLinkNewWalletModal } = useDynamicModals()
const userWallets = useUserWallets()
const wallets = useRef<Wallet<any>[]>()
const wallets = useRef<Wallet<any>[]>([])
const linkedWallets = useMemo(() => {
const _wallets = userWallets.reduce((linkedWallets, wallet) => {
linkedWallets.push(convertToLinkedWallet(wallet))
Expand Down
5 changes: 3 additions & 2 deletions demo/pages/ui/swap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ const SwapWidgetPage: NextPage = () => {
const _switchWallet = useSwitchWallet()
const { setShowLinkNewWalletModal } = useDynamicModals()
const userWallets = useUserWallets()
const wallets = useRef<Wallet<any>[]>()
const switchWallet = useRef<(walletId: string) => Promise<void>>()
const wallets = useRef<Wallet<any>[]>([])
const switchWallet =
useRef<(walletId: string) => Promise<void> | undefined>(undefined)
const [wallet, setWallet] = useState<AdaptedWallet | undefined>()
const [linkWalletPromise, setLinkWalletPromise] = useState<
| {
Expand Down
2 changes: 1 addition & 1 deletion packages/design-system/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@reservoir0x/relay-design-system",
"name": "@relayprotocol/relay-design-system",
"description": "This package is auto-generated by Panda CSS",
"version": "0.0.2",
"type": "module",
Expand Down
8 changes: 4 additions & 4 deletions packages/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@
"typescript-eslint": "^7.13.1"
},
"peerDependencies": {
"react": "^18.0",
"react-dom": "^18.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"viem": ">=2.26.0",
"@tanstack/react-query": ">=5.0.0"
},
"dependencies": {
"@relayprotocol/relay-sdk": "workspace:*",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"axios": "^1.7.2"
},
"keywords": [
Expand Down
8 changes: 4 additions & 4 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
"peerDependencies": {
"@moonpay/moonpay-react": "^1.8.3",
"@tanstack/react-query": ">=5.0.0",
"react": "^18.0",
"react-dom": "^18.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"viem": ">=2.26.0",
"wagmi": "^2.15.6"
},
Expand All @@ -88,8 +88,8 @@
"@relayprotocol/relay-design-system": "workspace:^",
"@relayprotocol/relay-kit-hooks": "workspace:*",
"@relayprotocol/relay-sdk": "workspace:*",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"axios": "^1.7.2",
"dayjs": "^1.11.11",
"framer-motion": "^11.2.10",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ type ChainFilterRowProps = {
onClick?: (e: React.MouseEvent) => void
tag?: string
value: string
activeChainRef?: React.RefObject<HTMLButtonElement>
activeChainRef?: React.RefObject<HTMLButtonElement | null>
}

const ChainFilterRow: FC<ChainFilterRowProps> = ({
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/primitives/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ type Props = {
}

const Dropdown = forwardRef<
ElementRef<typeof DropdownMenuPrimitive.Root>,
HTMLDivElement,
ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> & Props
>(({ children, trigger, contentProps, ...props }, forwardedRef) => {
const [open, setOpen] = useState(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const OnrampWidget: FC<OnrampWidgetProps> = ({
onSetPrimaryWallet,
onAnalyticEvent: _onAnalyticEvent,
onSuccess
}): JSX.Element => {
}) => {
const onAnalyticEvent = useCallback(
(eventName: string, data?: any) => {
try {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/widgets/SwapWidget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const SwapWidget: FC<SwapWidgetProps> = ({
onSwapSuccess,
onSwapValidating,
onSwapError
}): JSX.Element => {
}) => {
const onAnalyticEvent = useCallback(
(eventName: string, data?: any) => {
try {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/hooks/usePreviousValueChange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default <T>(
enabled: boolean,
onChange: (value: T) => void
) => {
const ref = useRef<T>()
const ref = useRef<T | undefined>(undefined)

useEffect(() => {
if (enabled && ref.current !== value) {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/providers/RelayClientProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const RelayClientContext = createContext<RelayClient | null>(null)
export const RelayClientProvider: FC<RelayClientProviderProps> = function ({
children,
options
}: RelayClientProviderProps): JSX.Element {
}: RelayClientProviderProps) {
const [clientContext] = useState<RelayClient | null>(
createClient({ ...options, uiVersion: UI_VERSION })
)
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/providers/RelayKitProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export const RelayKitProvider: FC<RelayKitProviderProps> = function ({
children,
options,
theme
}: RelayKitProviderProps): JSX.Element {
}: RelayKitProviderProps) {
const providerOptions = useMemo(
() => ({
appName: options.appName,
Expand Down
Loading