Skip to content

Commit

Permalink
Add initialValue to useRef where missing
Browse files Browse the repository at this point in the history
  • Loading branch information
steveluscher committed Dec 6, 2024
1 parent a77c046 commit 4ff653e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit 4ff653e

Please sign in to comment.