From 71356cfc8e65dab21e279e881d82e7ed57a4a0e7 Mon Sep 17 00:00:00 2001 From: raviramnani Date: Wed, 31 Jul 2024 00:10:18 +0530 Subject: [PATCH 1/6] Updated files giving error in github workflow --- .github/workflows/codeql-default.yml | 7 ++++++- .github/workflows/flutter.yml | 1 + .github/workflows/lint.yml | 2 +- easel/analysis_options.yaml | 1 - wallet/analysis_options.yaml | 1 - wallet/test/mocks/test_mocks.mocks.dart | 9 +++++---- wallet/test/widget_testing/extension/size_extension.dart | 2 +- wallet/test/widget_testing/helpers/size_extensions.dart | 2 +- 8 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/codeql-default.yml b/.github/workflows/codeql-default.yml index 5959cda56d..a0bec9a74e 100644 --- a/.github/workflows/codeql-default.yml +++ b/.github/workflows/codeql-default.yml @@ -13,7 +13,12 @@ name: "CodeQL" on: push: - branches: [ "main", [dmsm][eata][vsai][!o]* ] + branches: + - "main" + - "dmsm*" + - "eata*" + - "vsai*" + - "!o*" pull_request: # The branches below must be a subset of the branches above branches: [ "main" ] diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml index 5cc38bb806..a7ac3680dc 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/flutter.yml @@ -47,6 +47,7 @@ jobs: cd easel touch lib/env.dart echo "const apiKey = \"${{ secrets.EASEL_TOKEN }}\"; " >> lib/env.dart + echo "const X_API_KEY: ${{ secrets.X_API_KEY }}\"; " >> lib/env.dart ./android/app/json_manipulator.sh RANDOM_STRING flutter pub get flutter analyze diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8d5b242091..388a265c53 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.22.5 - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/easel/analysis_options.yaml b/easel/analysis_options.yaml index 52102a39dc..6acfff282b 100644 --- a/easel/analysis_options.yaml +++ b/easel/analysis_options.yaml @@ -14,7 +14,6 @@ analyzer: # implicit-dynamic: true errors: avoid_setters_without_getters: ignore - import_of_legacy_library_into_null_safe: error avoid_single_cascade_in_expression_statements: ignore missing_required_param: error # implicit_dynamic_map_literal: ignore diff --git a/wallet/analysis_options.yaml b/wallet/analysis_options.yaml index 0410732ce6..228cb58d78 100644 --- a/wallet/analysis_options.yaml +++ b/wallet/analysis_options.yaml @@ -14,7 +14,6 @@ analyzer: # implicit-dynamic: true errors: avoid_setters_without_getters: ignore - import_of_legacy_library_into_null_safe: error avoid_single_cascade_in_expression_statements: ignore missing_required_param: error # implicit_dynamic_map_literal: ignore diff --git a/wallet/test/mocks/test_mocks.mocks.dart b/wallet/test/mocks/test_mocks.mocks.dart index b224297128..cdac6c14f2 100644 --- a/wallet/test/mocks/test_mocks.mocks.dart +++ b/wallet/test/mocks/test_mocks.mocks.dart @@ -920,23 +920,24 @@ class MockFirebaseAppCheck extends _i1.Mock implements _i19.FirebaseAppCheck { ) as Map); @override _i8.Future activate({ - String? webRecaptchaSiteKey, - _i20.AndroidProvider? androidProvider = _i20.AndroidProvider.playIntegrity, - _i20.AppleProvider? appleProvider = _i20.AppleProvider.deviceCheck, + _i20.AndroidProvider androidProvider = _i20.AndroidProvider.playIntegrity, // Set a default value if necessary + _i20.AppleProvider appleProvider = _i20.AppleProvider.deviceCheck, // Set a default value if necessary + _i20.WebProvider? webProvider, }) => (super.noSuchMethod( Invocation.method( #activate, [], { - #webRecaptchaSiteKey: webRecaptchaSiteKey, #androidProvider: androidProvider, #appleProvider: appleProvider, + #webProvider: webProvider, }, ), returnValue: _i8.Future.value(), returnValueForMissingStub: _i8.Future.value(), ) as _i8.Future); + @override _i8.Future getToken([bool? forceRefresh]) => (super.noSuchMethod( Invocation.method( diff --git a/wallet/test/widget_testing/extension/size_extension.dart b/wallet/test/widget_testing/extension/size_extension.dart index eb318844da..86ea6cc5c1 100644 --- a/wallet/test/widget_testing/extension/size_extension.dart +++ b/wallet/test/widget_testing/extension/size_extension.dart @@ -36,6 +36,6 @@ extension SetScreenSize on WidgetTester { ), ), ); - }), duration); + }), duration: duration); } } diff --git a/wallet/test/widget_testing/helpers/size_extensions.dart b/wallet/test/widget_testing/helpers/size_extensions.dart index 30343b1de9..71061c6605 100644 --- a/wallet/test/widget_testing/helpers/size_extensions.dart +++ b/wallet/test/widget_testing/helpers/size_extensions.dart @@ -24,6 +24,6 @@ extension SetScreenSize on WidgetTester { }), ); }); - }), duration); + }), duration: duration); } } From 35882918b2cc4ef786d24395a7cb34d34af64930 Mon Sep 17 00:00:00 2001 From: raviramnani Date: Wed, 31 Jul 2024 00:38:00 +0530 Subject: [PATCH 2/6] =?UTF-8?q?Updated=20file=20wallpaper=5Fset=5Fscreen.d?= =?UTF-8?q?art=20RequestSizeOption=20from=20resize=5Ffit=20to=20RESIZE=5FC?= =?UTF-8?q?ENTRE=5FCROP=20because=20of=20error=20=20error=20=E2=80=A2=20Th?= =?UTF-8?q?ere's=20no=20constant=20named=20'RESIZE=5FFIT'=20in=20'RequestS?= =?UTF-8?q?izeOptions'=20=E2=80=A2=20lib/pages/detailed=5Fasset=5Fview/wid?= =?UTF-8?q?gets/wallpaper=5Fset=5Fscreen.dart:53:62=20=E2=80=A2=20undefine?= =?UTF-8?q?d=5Fenum=5Fconstant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/detailed_asset_view/widgets/wallpaper_set_screen.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wallet/lib/pages/detailed_asset_view/widgets/wallpaper_set_screen.dart b/wallet/lib/pages/detailed_asset_view/widgets/wallpaper_set_screen.dart index fba5ed9161..ff0c815489 100644 --- a/wallet/lib/pages/detailed_asset_view/widgets/wallpaper_set_screen.dart +++ b/wallet/lib/pages/detailed_asset_view/widgets/wallpaper_set_screen.dart @@ -50,7 +50,7 @@ class _WallpaperScreenState extends State<_WallpaperScreen> { downloading.value = true; }, onDone: () async { downloading.value = false; - await Wallpaper.lockScreen(options: RequestSizeOptions.RESIZE_FIT); + await Wallpaper.lockScreen(options: RequestSizeOptions.RESIZE_CENTRE_CROP); done.value = true; }, onError: (error) { downloading.value = false; From adb0929a713a64b785ca0d64e0c10efa9889d28b Mon Sep 17 00:00:00 2001 From: raviramnani Date: Wed, 31 Jul 2024 00:42:48 +0530 Subject: [PATCH 3/6] =?UTF-8?q?Updated=20file=20wallpaper=5Fset=5Fscreen.d?= =?UTF-8?q?art=20RequestSizeOption=20from=20resize=5Ffit=20to=20RESIZE=5FE?= =?UTF-8?q?XACT=20because=20of=20error=20=20error=20=E2=80=A2=20There's=20?= =?UTF-8?q?no=20constant=20named=20'RESIZE=5FCENTRE=5FCROP'=20in=20'Reques?= =?UTF-8?q?tSizeOptions'=20=E2=80=A2=20lib/pages/detailed=5Fasset=5Fview/w?= =?UTF-8?q?idgets/wallpaper=5Fset=5Fscreen.dart:53:62=20=E2=80=A2=20undefi?= =?UTF-8?q?ned=5Fenum=5Fconstant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/detailed_asset_view/widgets/wallpaper_set_screen.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wallet/lib/pages/detailed_asset_view/widgets/wallpaper_set_screen.dart b/wallet/lib/pages/detailed_asset_view/widgets/wallpaper_set_screen.dart index ff0c815489..16d38cc363 100644 --- a/wallet/lib/pages/detailed_asset_view/widgets/wallpaper_set_screen.dart +++ b/wallet/lib/pages/detailed_asset_view/widgets/wallpaper_set_screen.dart @@ -50,7 +50,7 @@ class _WallpaperScreenState extends State<_WallpaperScreen> { downloading.value = true; }, onDone: () async { downloading.value = false; - await Wallpaper.lockScreen(options: RequestSizeOptions.RESIZE_CENTRE_CROP); + await Wallpaper.lockScreen(options: RequestSizeOptions.RESIZE_EXACT); done.value = true; }, onError: (error) { downloading.value = false; From 27ff425febfd3426a254208231afd0d8aed71bf4 Mon Sep 17 00:00:00 2001 From: raviramnani Date: Wed, 31 Jul 2024 00:51:55 +0530 Subject: [PATCH 4/6] =?UTF-8?q?Updated=20file=20wallpaper=5Fset=5Fscreen.d?= =?UTF-8?q?art=20RequestSizeOption=20removed=20because=20of=20error=20=20e?= =?UTF-8?q?rror=20=E2=80=A2=20There's=20no=20constant=20named=20'RESIZE=5F?= =?UTF-8?q?CENTRE=5FCROP'=20in=20'RequestSizeOptions'=20=E2=80=A2=20lib/pa?= =?UTF-8?q?ges/detailed=5Fasset=5Fview/widgets/wallpaper=5Fset=5Fscreen.da?= =?UTF-8?q?rt:53:62=20=E2=80=A2=20undefined=5Fenum=5Fconstant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/detailed_asset_view/widgets/wallpaper_set_screen.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wallet/lib/pages/detailed_asset_view/widgets/wallpaper_set_screen.dart b/wallet/lib/pages/detailed_asset_view/widgets/wallpaper_set_screen.dart index 16d38cc363..571578b40e 100644 --- a/wallet/lib/pages/detailed_asset_view/widgets/wallpaper_set_screen.dart +++ b/wallet/lib/pages/detailed_asset_view/widgets/wallpaper_set_screen.dart @@ -50,7 +50,7 @@ class _WallpaperScreenState extends State<_WallpaperScreen> { downloading.value = true; }, onDone: () async { downloading.value = false; - await Wallpaper.lockScreen(options: RequestSizeOptions.RESIZE_EXACT); + await Wallpaper.lockScreen(); done.value = true; }, onError: (error) { downloading.value = false; From b7f1ce2301909cd7aa68000dfa69a02efa49e387 Mon Sep 17 00:00:00 2001 From: raviramnani Date: Wed, 31 Jul 2024 00:59:36 +0530 Subject: [PATCH 5/6] Updated file flutter.yml to add x_api_key for quick node --- .github/workflows/flutter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml index a7ac3680dc..73654adedc 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/flutter.yml @@ -47,7 +47,7 @@ jobs: cd easel touch lib/env.dart echo "const apiKey = \"${{ secrets.EASEL_TOKEN }}\"; " >> lib/env.dart - echo "const X_API_KEY: ${{ secrets.X_API_KEY }}\"; " >> lib/env.dart + echo "const X_API_KEY = \"${{ secrets.X_API_KEY }}\"; " >> lib/env.dart ./android/app/json_manipulator.sh RANDOM_STRING flutter pub get flutter analyze From 0c46d4e5f961261e0d6897054caacf6ea80e6d79 Mon Sep 17 00:00:00 2001 From: raviramnani Date: Wed, 31 Jul 2024 17:37:32 +0530 Subject: [PATCH 6/6] updated some files --- easel/lib/repository/repository.dart | 4 ++-- easel/lib/widgets/loading.dart | 1 - easel/lib/widgets/loading_with_progress.dart | 1 - wallet/lib/components/loading.dart | 1 - wallet/lib/components/no_internet.dart | 1 - 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/easel/lib/repository/repository.dart b/easel/lib/repository/repository.dart index bf165f041e..da74ccb7f4 100644 --- a/easel/lib/repository/repository.dart +++ b/easel/lib/repository/repository.dart @@ -324,8 +324,8 @@ class RepositoryImp implements Repository { try { final storageResponseModel = await remoteDataSource.uploadFile(file: file, uploadProgressCallback: onUploadProgressCallback); return Right(storageResponseModel); - } on Exception catch (_) { - crashlyticsHelper.recordFatalError(error: _.toString()); + } on Exception catch (e) { + crashlyticsHelper.recordFatalError(error: e.toString()); return Left(CacheFailure(LocaleKeys.update_failed.tr())); } } diff --git a/easel/lib/widgets/loading.dart b/easel/lib/widgets/loading.dart index 8cdef25b1f..d054861925 100644 --- a/easel/lib/widgets/loading.dart +++ b/easel/lib/widgets/loading.dart @@ -21,7 +21,6 @@ class Loading { } return showDialog( context: navigatorKey.currentState!.overlay!.context, - barrierDismissible: true, barrierColor: Colors.white.withOpacity(0), builder: (ctx) => PopScope( canPop: false, diff --git a/easel/lib/widgets/loading_with_progress.dart b/easel/lib/widgets/loading_with_progress.dart index b528621cb0..f1f466b644 100644 --- a/easel/lib/widgets/loading_with_progress.dart +++ b/easel/lib/widgets/loading_with_progress.dart @@ -25,7 +25,6 @@ class LoadingProgress { } return showDialog( context: navigatorKey.currentState!.overlay!.context, - barrierDismissible: true, builder: (ctx) => PopScope( canPop: false, child: AlertDialog( diff --git a/wallet/lib/components/loading.dart b/wallet/lib/components/loading.dart index a060d36e11..8a3b43df02 100644 --- a/wallet/lib/components/loading.dart +++ b/wallet/lib/components/loading.dart @@ -35,7 +35,6 @@ class Loading { } return showDialog( context: navigatorKey.currentState!.overlay!.context, - barrierDismissible: true, barrierColor: Colors.white.withOpacity(0), builder: (ctx) => PopScope( canPop: false, diff --git a/wallet/lib/components/no_internet.dart b/wallet/lib/components/no_internet.dart index 856a8f0968..e4a1e8934c 100644 --- a/wallet/lib/components/no_internet.dart +++ b/wallet/lib/components/no_internet.dart @@ -35,7 +35,6 @@ class NoInternetDialog { return showDialog( context: navigatorKey.currentState!.overlay!.context, - barrierDismissible: true, barrierColor: Colors.white.withOpacity(0), builder: (ctx) { setIsShowing = true;