From c7dad4a9e92141bde4a0efb87704b842ba13248d Mon Sep 17 00:00:00 2001 From: reasje Date: Fri, 16 Aug 2024 11:55:58 +0330 Subject: [PATCH] fix: Support http for dapps --- .../presentation/responsive_layout/dapps_layout/build_card.dart | 2 ++ .../add_dapp/presentation/add_bookmark_presenter.dart | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/features/dapps/presentation/responsive_layout/dapps_layout/build_card.dart b/lib/features/dapps/presentation/responsive_layout/dapps_layout/build_card.dart index 574fa2ba..fa2d6168 100644 --- a/lib/features/dapps/presentation/responsive_layout/dapps_layout/build_card.dart +++ b/lib/features/dapps/presentation/responsive_layout/dapps_layout/build_card.dart @@ -76,6 +76,8 @@ Widget buildCard( ) : image.contains( 'https', + ) || image.contains( + 'http', ) ? image.contains( 'svg', diff --git a/lib/features/dapps/subfeatures/add_dapp/presentation/add_bookmark_presenter.dart b/lib/features/dapps/subfeatures/add_dapp/presentation/add_bookmark_presenter.dart index 5d68ec3e..cacfeadf 100644 --- a/lib/features/dapps/subfeatures/add_dapp/presentation/add_bookmark_presenter.dart +++ b/lib/features/dapps/subfeatures/add_dapp/presentation/add_bookmark_presenter.dart @@ -18,7 +18,7 @@ class AddBookmarkPresenter extends CompletePresenter { Future onSave() async { String url = urlController.text; - url = url.contains('https') ? url : 'https://$url'; + url = url.contains('https') || url.contains('http') ? url : 'https://$url'; loading = true; try {