File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff 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" ,
Original file line number Diff line number Diff line change @@ -6,15 +6,9 @@ export type EIP6963ProviderInfo = {
66} ;
77
88export 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
2014export type AnnounceEvent = CustomEvent < {
You can’t perform that action at this time.
0 commit comments