Skip to content

Commit 88f6f87

Browse files
committed
stricly type pending
1 parent 0dfc694 commit 88f6f87

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ export function App() {
133133
const signAndSendCurrent = async () => {
134134
if (!walletClient || !selected || !pending) return;
135135

136+
if (!pending?.request) return;
137+
136138
try {
137139
const hash = (await selected.provider.request({
138140
method: "eth_sendTransaction",

src/utils/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { TransactionRequest } from "viem";
2+
13
export type EIP6963ProviderInfo = {
24
uuid: string;
35
name: string;
@@ -40,4 +42,4 @@ declare global {
4042

4143
export type ApiOk<T> = { status: "ok"; data: T };
4244
export type ApiErr = { status: string; message?: string };
43-
export type PendingAny = Record<string, unknown> & { id: string };
45+
export type PendingAny = Record<string, unknown> & { id: string; request: TransactionRequest };

0 commit comments

Comments
 (0)