diff --git a/example/dapp/lib/pages/connect_page.dart b/example/dapp/lib/pages/connect_page.dart index 6581e75..54adada 100644 --- a/example/dapp/lib/pages/connect_page.dart +++ b/example/dapp/lib/pages/connect_page.dart @@ -467,14 +467,17 @@ class ConnectPageState extends State { walletUniversalLink: universalLink, ); + debugPrint('[SampleDapp] authResponse.uri ${authResponse.uri}'); try { - debugPrint('[SampleDapp] authResponse.uri ${authResponse.uri}'); - await WalletConnectUtils.openURL(authResponse.uri.toString()); + // If response uri is not universalLink show QR Code + if (authResponse.uri?.authority != Uri.parse(universalLink).authority) { + _showQrCode('${authResponse.uri}', walletScheme: nativeLink); + } else { + await WalletConnectUtils.openURL(authResponse.uri.toString()); + } } catch (e) { - _showQrCode( - authResponse.uri.toString(), - walletScheme: nativeLink, - ); + debugPrint('[SampleDapp] authResponse error $e'); + _showQrCode('${authResponse.uri}', walletScheme: nativeLink); } try {