-
Notifications
You must be signed in to change notification settings - Fork 63
[appkit] Navigator.pop is called without properly checking if the modal has been opened #331
Copy link
Copy link
Open
Labels
awaiting customerFurther information has been requestedFurther information has been requested
Description
SDK Affected
AppKit
Describe the bug
reown_flutter/packages/reown_appkit/lib/modal/appkit_modal_impl.dart
Lines 1404 to 1411 in ac096cb
| // If we aren't open, then we can't and shouldn't close | |
| _close(); | |
| if (_context != null) { | |
| final canPop = Navigator.of(_context!, rootNavigator: true).canPop(); | |
| if (canPop) { | |
| Navigator.of(_context!, rootNavigator: true).pop(); | |
| } | |
| } |
The closeModal method calls navigation popping without checking if the modal has opened.
To Reproduce
// Select and connect a target wallet directly without opening the modal.
_appKitModal.selectWallet(targetWallet);
await _appKitModal.connectSelectedWallet();Expected behavior
The navigation operation should not be called if the modal is not open.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
awaiting customerFurther information has been requestedFurther information has been requested