File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,7 @@ export const UseInkathonProvider: FC<UseInkathonProviderProps> = ({
236
236
console . error ( 'Error while connecting wallet:' , e )
237
237
setActiveExtension ( undefined )
238
238
setActiveSigner ( undefined )
239
+ setIsConnected ( false )
239
240
} finally {
240
241
setIsConnecting ( false )
241
242
}
@@ -247,10 +248,12 @@ export const UseInkathonProvider: FC<UseInkathonProviderProps> = ({
247
248
} , [ api , activeSigner ] )
248
249
249
250
// Disconnect
250
- const disconnect = async ( ) => {
251
- await api ?. disconnect ( )
251
+ const disconnect = async ( disconnectApi ?: boolean ) => {
252
+ if ( disconnectApi ) {
253
+ await api ?. disconnect ( )
254
+ setIsInitialized ( false )
255
+ }
252
256
setIsConnected ( false )
253
- setIsConnecting ( false )
254
257
updateAccounts ( [ ] )
255
258
unsubscribeAccounts ?.( )
256
259
setUnsubscribeAccounts ( undefined )
You can’t perform that action at this time.
0 commit comments