Skip to content

Commit 23759ea

Browse files
authored
Merge pull request #762 from relayprotocol/ted/fe-7887-upgrade-sdk-to-react-19
Upgrade to React 19
2 parents c2c995e + 8e3ed54 commit 23759ea

File tree

16 files changed

+3247
-8364
lines changed

16 files changed

+3247
-8364
lines changed

.changeset/nice-numbers-invent.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@relayprotocol/relay-design-system': major
3+
'@relayprotocol/relay-kit-hooks': major
4+
'@relayprotocol/relay-kit-ui': major
5+
---
6+
7+
Upgrade to React 19

demo/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@
3939
"next": "latest",
4040
"next-remote-watch": "^1.0.0",
4141
"next-themes": "^0.2.0",
42-
"react": "^18.0.0",
43-
"react-dom": "^18.0.0",
42+
"react": "^19.0.0",
43+
"react-dom": "^19.0.0",
4444
"usehooks-ts": "^3.1.0",
4545
"viem": ">=2.26.0",
4646
"wagmi": "^2.15.6"
4747
},
4848
"devDependencies": {
4949
"@dynamic-labs/types": "4.10.4",
5050
"@types/node": "^12.12.21",
51-
"@types/react": "^18.0.0",
52-
"@types/react-dom": "^18.0.0",
51+
"@types/react": "^19.0.0",
52+
"@types/react-dom": "^19.0.0",
5353
"typescript": "5.4.5"
5454
}
5555
}

demo/pages/ui/chain.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ const ChainWidgetPage: NextPage = () => {
4646
const { setWalletFilter } = useWalletFilter()
4747
const _switchWallet = useSwitchWallet()
4848
const userWallets = useUserWallets()
49-
const wallets = useRef<Wallet<any>[]>()
50-
const switchWallet = useRef<(walletId: string) => Promise<void>>()
49+
const wallets = useRef<Wallet<any>[]>([])
50+
const switchWallet =
51+
useRef<(walletId: string) => Promise<void> | undefined>(undefined)
5152
const [wallet, setWallet] = useState<AdaptedWallet | undefined>()
5253
const [linkWalletPromise, setLinkWalletPromise] = useState<
5354
| {

demo/pages/ui/onramp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const OnrampPage: NextPage = () => {
3737
const { setShowAuthFlow } = useDynamicContext()
3838
const { setShowLinkNewWalletModal } = useDynamicModals()
3939
const userWallets = useUserWallets()
40-
const wallets = useRef<Wallet<any>[]>()
40+
const wallets = useRef<Wallet<any>[]>([])
4141
const linkedWallets = useMemo(() => {
4242
const _wallets = userWallets.reduce((linkedWallets, wallet) => {
4343
linkedWallets.push(convertToLinkedWallet(wallet))

demo/pages/ui/swap.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ const SwapWidgetPage: NextPage = () => {
6969
const _switchWallet = useSwitchWallet()
7070
const { setShowLinkNewWalletModal } = useDynamicModals()
7171
const userWallets = useUserWallets()
72-
const wallets = useRef<Wallet<any>[]>()
73-
const switchWallet = useRef<(walletId: string) => Promise<void>>()
72+
const wallets = useRef<Wallet<any>[]>([])
73+
const switchWallet =
74+
useRef<(walletId: string) => Promise<void> | undefined>(undefined)
7475
const [wallet, setWallet] = useState<AdaptedWallet | undefined>()
7576
const [linkWalletPromise, setLinkWalletPromise] = useState<
7677
| {

packages/design-system/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@reservoir0x/relay-design-system",
2+
"name": "@relayprotocol/relay-design-system",
33
"description": "This package is auto-generated by Panda CSS",
44
"version": "0.0.2",
55
"type": "module",

packages/hooks/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@
4343
"typescript-eslint": "^7.13.1"
4444
},
4545
"peerDependencies": {
46-
"react": "^18.0",
47-
"react-dom": "^18.0",
46+
"react": "^19.0.0",
47+
"react-dom": "^19.0.0",
4848
"viem": ">=2.26.0",
4949
"@tanstack/react-query": ">=5.0.0"
5050
},
5151
"dependencies": {
5252
"@relayprotocol/relay-sdk": "workspace:*",
53-
"@types/react": "^18.0.0",
54-
"@types/react-dom": "^18.0.0",
53+
"@types/react": "^19.0.0",
54+
"@types/react-dom": "^19.0.0",
5555
"axios": "^1.7.2"
5656
},
5757
"keywords": [

packages/ui/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
"peerDependencies": {
6262
"@moonpay/moonpay-react": "^1.8.3",
6363
"@tanstack/react-query": ">=5.0.0",
64-
"react": "^18.0",
65-
"react-dom": "^18.0",
64+
"react": "^19.0.0",
65+
"react-dom": "^19.0.0",
6666
"viem": ">=2.26.0",
6767
"wagmi": "^2.15.6"
6868
},
@@ -88,8 +88,8 @@
8888
"@relayprotocol/relay-design-system": "workspace:^",
8989
"@relayprotocol/relay-kit-hooks": "workspace:*",
9090
"@relayprotocol/relay-sdk": "workspace:*",
91-
"@types/react": "^18.0.0",
92-
"@types/react-dom": "^18.0.0",
91+
"@types/react": "^19.0.0",
92+
"@types/react-dom": "^19.0.0",
9393
"axios": "^1.7.2",
9494
"dayjs": "^1.11.11",
9595
"framer-motion": "^11.2.10",

packages/ui/src/components/common/TokenSelector/ChainFilterSidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ type ChainFilterRowProps = {
278278
onClick?: (e: React.MouseEvent) => void
279279
tag?: string
280280
value: string
281-
activeChainRef?: React.RefObject<HTMLButtonElement>
281+
activeChainRef?: React.RefObject<HTMLButtonElement | null>
282282
}
283283

284284
const ChainFilterRow: FC<ChainFilterRowProps> = ({

packages/ui/src/components/primitives/Dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ type Props = {
8686
}
8787

8888
const Dropdown = forwardRef<
89-
ElementRef<typeof DropdownMenuPrimitive.Root>,
89+
HTMLDivElement,
9090
ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> & Props
9191
>(({ children, trigger, contentProps, ...props }, forwardedRef) => {
9292
const [open, setOpen] = useState(false)

0 commit comments

Comments
 (0)