Skip to content

Commit a4b22ed

Browse files
committed
refactor: only remove text on reown connection success
1 parent b5ebaab commit a4b22ed

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/screens/ReownConnect.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,10 @@ function ReownConnect() {
2626

2727
useEffect(() => {
2828
if (prevConnectionStateRef.current === REOWN_CONNECTION_STATE.CONNECTING &&
29-
(connectionState === REOWN_CONNECTION_STATE.FAILED
30-
|| connectionState === REOWN_CONNECTION_STATE.SUCCESS)
31-
) {
29+
connectionState === REOWN_CONNECTION_STATE.SUCCESS) {
3230
// Clear input text when connection succeeds
33-
if (connectionState === REOWN_CONNECTION_STATE.SUCCESS) {
34-
setUri('');
35-
setShowNewConnectionForm(false);
36-
}
31+
setUri('');
32+
setShowNewConnectionForm(false);
3733
}
3834

3935
// Update the ref after checking

0 commit comments

Comments
 (0)