diff --git a/lib/src/walletconnect.dart b/lib/src/walletconnect.dart index 4edbebf..188160d 100644 --- a/lib/src/walletconnect.dart +++ b/lib/src/walletconnect.dart @@ -392,6 +392,8 @@ class WalletConnect { ); unawaited(_sendRequest(request)); + // Avoid starting `_handleSessionDisconnect` before completing `_sendRequest`, which will cause the dapp to not be disconnected from the wallet, https://github.com/RootSoft/walletconnect-dart-sdk/issues/84 + await Future.delayed(const Duration(milliseconds: 100)); await _handleSessionDisconnect(errorMessage: message, forceClose: true); }