File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
src/features/wallet-connect/components/composite/wallet-approval-view Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,12 @@ import { styles } from './styles';
32
32
export const WalletConnectApprovalView = ( ) => {
33
33
const { t } = useTranslation ( ) ;
34
34
const { wallet } = useWalletStore ( ) ;
35
- const { proposal, setActiveSessions, setWalletConnectStep } =
36
- useWalletConnectContextSelector ( ) ;
35
+ const {
36
+ proposal,
37
+ setActiveSessions,
38
+ walletConnectStep,
39
+ setWalletConnectStep
40
+ } = useWalletConnectContextSelector ( ) ;
37
41
const { onDismissWalletConnectBottomSheet } = useHandleBottomSheetActions ( ) ;
38
42
39
43
const [ isLoadingApprove , setIsLoadingApprove ] = useState ( false ) ;
@@ -115,6 +119,10 @@ export const WalletConnectApprovalView = () => {
115
119
throw error ;
116
120
} finally {
117
121
setIsLoadingApprove ( false ) ;
122
+
123
+ if ( walletConnectStep === CONNECT_VIEW_STEPS . CONNECT_ERROR ) {
124
+ onDismissWalletConnectBottomSheet ( ) ;
125
+ }
118
126
}
119
127
}
120
128
} , [
@@ -123,7 +131,8 @@ export const WalletConnectApprovalView = () => {
123
131
setActiveSessions ,
124
132
onDismissWalletConnectBottomSheet ,
125
133
onShowToastNotification ,
126
- setWalletConnectStep
134
+ setWalletConnectStep ,
135
+ walletConnectStep
127
136
] ) ;
128
137
129
138
const RenderFooterNode = useCallback ( ( ) => {
You can’t perform that action at this time.
0 commit comments