From 4a8de38006c2006e9929ead89ac6d08e7358224d Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 12 Sep 2023 13:21:21 +0330 Subject: [PATCH] fix: Removed refresh for all dapps --- .../subfeatures/open_dapp/open_dapp_page.dart | 15 ++++++------- .../lib/inapp_webview_eip1193.dart | 22 +++++++++---------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/lib/features/dapps/subfeatures/open_dapp/open_dapp_page.dart b/lib/features/dapps/subfeatures/open_dapp/open_dapp_page.dart index aed80d38..7eec00b0 100644 --- a/lib/features/dapps/subfeatures/open_dapp/open_dapp_page.dart +++ b/lib/features/dapps/subfeatures/open_dapp/open_dapp_page.dart @@ -95,14 +95,13 @@ class OpenAppPage extends HookConsumerWidget { case EIP1193.addEthereumChain: bool? result = await presenter.addEthereumChain(id, params); - final isL3Bridge = - Config.reloadDapp.any((e) => url.contains(e)); - if (isL3Bridge) { - if (result != null && result) { - controller!.reload(); - } - } - + // final isL3Bridge = + // Config.reloadDapp.any((e) => url.contains(e)); + // if (isL3Bridge) { + // if (result != null && result) { + // controller!.reload(); + // } + // } break; default: break; diff --git a/packages/web3_provider/lib/inapp_webview_eip1193.dart b/packages/web3_provider/lib/inapp_webview_eip1193.dart index 3d05ebc3..5fca41d7 100644 --- a/packages/web3_provider/lib/inapp_webview_eip1193.dart +++ b/packages/web3_provider/lib/inapp_webview_eip1193.dart @@ -956,17 +956,17 @@ class _InAppWebViewEIP1193State extends State { onConsoleMessage: widget.onConsoleMessage, onProgressChanged: (controller, progress) async { widget.onProgressChanged?.call(controller, progress); - final url = await controller.getUrl(); - final isL3Bridge = - Config.reloadDapp.any((e) => e.contains(url!.host)); - if (isL3Bridge) { - await _webViewController?.evaluateJavascript( - source: jsProviderScript ?? '', - ); - await _webViewController?.evaluateJavascript( - source: _getFunctionInject(), - ); - } + // final url = await controller.getUrl(); + // final isL3Bridge = + // Config.reloadDapp.any((e) => e.contains(url!.host)); + // if (isL3Bridge) { + // await _webViewController?.evaluateJavascript( + // source: jsProviderScript ?? '', + // ); + // await _webViewController?.evaluateJavascript( + // source: _getFunctionInject(), + // ); + // } }, shouldOverrideUrlLoading: widget.shouldOverrideUrlLoading, onLoadResource: widget.onLoadResource,