Skip to content

Commit

Permalink
Upgrade to React 19
Browse files Browse the repository at this point in the history
  • Loading branch information
steveluscher committed Dec 9, 2024
1 parent 77f354b commit 9ed2a03
Show file tree
Hide file tree
Showing 5 changed files with 527 additions and 549 deletions.
8 changes: 4 additions & 4 deletions examples/react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
"@solana/web3.js": "workspace:*",
"@wallet-standard/core": "^1.1.0",
"@wallet-standard/react": "^1.0.0",
"react": "^18.3.0",
"react-dom": "^19.0.0",
"react": "^19",
"react-dom": "^19",
"react-error-boundary": "^4.1.2",
"swr": "^2.2.5"
},
"devDependencies": {
"@solana/wallet-standard-features": "^1.2.0",
"@types/react": "^18.3",
"@types/react-dom": "^19.0",
"@types/react": "^19",
"@types/react-dom": "^19",
"@vitejs/plugin-react-swc": "^3.7.2",
"eslint-plugin-react-refresh": "^0.4.16",
"globals": "^15.13.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@
},
"devDependencies": {
"@solana/codecs-core": "workspace:*",
"@types/react": "^18",
"@types/react-test-renderer": "^18",
"react": "^18",
"@types/react": "^19",
"@types/react-test-renderer": "^19",
"react": "^19",
"react-error-boundary": "^4.1.2",
"react-test-renderer": "^18"
"react-test-renderer": "^19"
},
"peerDependencies": {
"react": ">=18"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function useWalletAccountTransactionSendingSigner<TWalletAccount extends
uiWalletAccount: TWalletAccount,
chain: `solana:${string}`,
): TransactionSendingSigner<TWalletAccount['address']> {
const encoderRef = useRef<ReturnType<typeof getTransactionEncoder>>();
const encoderRef = useRef<ReturnType<typeof getTransactionEncoder> | null>(null);
const signAndSendTransaction = useSignAndSendTransaction(uiWalletAccount, chain);
return useMemo(
() => ({
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/useWalletAccountTransactionSigner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function useWalletAccountTransactionSigner<TWalletAccount extends UiWalle
uiWalletAccount: TWalletAccount,
chain: `solana:${string}`,
): TransactionModifyingSigner<TWalletAccount['address']> {
const encoderRef = useRef<ReturnType<typeof getTransactionCodec>>();
const encoderRef = useRef<ReturnType<typeof getTransactionCodec> | null>(null);
const signTransaction = useSignTransaction(uiWalletAccount, chain);
return useMemo(
() => ({
Expand Down
Loading

0 comments on commit 9ed2a03

Please sign in to comment.