Skip to content

Commit

Permalink
chore: upgrade to Typescript 5.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerilym committed Jan 22, 2025
1 parent b77678a commit 70082f6
Show file tree
Hide file tree
Showing 5 changed files with 249 additions and 534 deletions.
6 changes: 4 additions & 2 deletions apps/staking/app/faucet/AuthModule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ export const AuthModule = ({ code }: { code?: string }) => {
const form = useForm<z.infer<typeof FormSchema>>({
resolver: zodResolver(FormSchema),
defaultValues: {
walletAddress: '',
// This is fine
walletAddress: '' as Address,
// discordId: '',
// telegramId: '',
code: code ?? '',
Expand Down Expand Up @@ -217,7 +218,8 @@ export const AuthModule = ({ code }: { code?: string }) => {
switchChain({ chainId: arbitrumSepolia.id });
}
} else {
form.reset({ walletAddress: '', code: referralCode });
// This is fine, we're resetting the form
form.reset({ walletAddress: '' as Address, code: referralCode });
form.clearErrors();
setTransactionHash(null);
}
Expand Down
2 changes: 1 addition & 1 deletion apps/staking/components/DevSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function PageSpecificFeatureFlags() {
const pageFlags = pathname
.split('/')
.flatMap((slug) => pageFeatureFlags[slug])
.filter((flag) => flag !== undefined) as Array<FEATURE_FLAG>;
.filter((flag) => flag !== undefined);

if (!pageFlags || pageFlags.length === 0) return null;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"ts-jest": "^29.1.5",
"ts-node": "^10.9.2",
"turbo": "2.0.5",
"typescript": "5.4.5"
"typescript": "5.7.3"
},
"engines": {
"node": ">=22",
Expand Down
16 changes: 14 additions & 2 deletions packages/wallet/lib/server-wallet.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
import { Address, type Chain, createPublicClient, createWalletClient, http } from 'viem';
import {
Address,
type Chain,
createPublicClient,
createWalletClient,
http,
type HttpTransport,
type PrivateKeyAccount,
type WalletClient,
} from 'viem';
import { nonceManager, privateKeyToAccount } from 'viem/accounts';

export function createServerWallet(privateKey: Address, chain: Chain) {
export function createServerWallet(
privateKey: Address,
chain: Chain
): WalletClient<HttpTransport, Chain, PrivateKeyAccount> {
if (!privateKey) {
throw new Error('Private key is required to create a server wallet');
}
Expand Down
Loading

0 comments on commit 70082f6

Please sign in to comment.