Skip to content

Commit 84b6c44

Browse files
committed
fixes
1 parent 347358f commit 84b6c44

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/App.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ export function App() {
7474
useEffect(() => {
7575
if (!selected) return;
7676

77-
const onAccountsChanged = (accts: string[]) =>
78-
setAccount((accts?.[0] as Address) || undefined);
77+
const onAccountsChanged = (accounts: string[]) =>
78+
setAccount((accounts?.[0] as Address) || undefined);
7979

8080
const onChainChanged = (hex: string) => {
8181
const id = parseInt(hex, 16);
@@ -85,6 +85,7 @@ export function App() {
8585

8686
selected.provider.on?.("accountsChanged", onAccountsChanged);
8787
selected.provider.on?.("chainChanged", onChainChanged);
88+
8889
return () => {
8990
selected.provider.removeListener?.("accountsChanged", onAccountsChanged);
9091
selected.provider.removeListener?.("chainChanged", onChainChanged);
@@ -131,6 +132,7 @@ export function App() {
131132

132133
const disconnect = async () => {
133134
setAccount(undefined);
135+
134136
try {
135137
await walletClient?.transport.request({
136138
method: "wallet_revokePermissions",

src/types.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,9 @@ export type EIP6963ProviderInfo = {
66
};
77

88
export type EIP1193 = {
9-
request: (args: {
10-
method: string;
11-
params?: unknown[] | object;
12-
}) => Promise<unknown>;
13-
on?: (event: string, listener: (...args: unknown[]) => void) => void;
14-
removeListener?: (
15-
event: string,
16-
listener: (...args: unknown[]) => void
17-
) => void;
9+
request: (args: { method: string; params?: any[] | object }) => Promise<any>;
10+
on?: (event: string, listener: (...args: any[]) => void) => void;
11+
removeListener?: (event: string, listener: (...args: any[]) => void) => void;
1812
};
1913

2014
export type AnnounceEvent = CustomEvent<{

0 commit comments

Comments
 (0)