From 224fd25e58ce2bc903a518c0541f92d6fcf9b0d7 Mon Sep 17 00:00:00 2001 From: reasje Date: Fri, 13 Dec 2024 13:20:47 +0330 Subject: [PATCH 01/24] fix: Force google ad id removal from merged manifest --- android/app/src/main/AndroidManifest.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index c956231d..25acc46b 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -36,6 +36,13 @@ + + + + From ddc99d8c1f349c223f368c4918ec2b6b26210000 Mon Sep 17 00:00:00 2001 From: reasje Date: Fri, 13 Dec 2024 13:22:05 +0330 Subject: [PATCH 02/24] fix: Bump version --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 1fcbb0ec..d93f8ff0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -19,7 +19,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.4.0 +version: 1.4.1 environment: From 789831eea9a1960038b81af10b597fa4683f7627 Mon Sep 17 00:00:00 2001 From: reasje Date: Sat, 14 Dec 2024 14:25:49 +0330 Subject: [PATCH 03/24] fix: Remove unnecessary padding from bottom sheets --- .../speed_up_cancel_bottom_sheet_info.dart | 37 ++++----- .../open_dapp/widgets/add_asset_info.dart | 11 +-- .../open_dapp/widgets/message_info.dart | 13 ++-- .../open_dapp/widgets/transaction_info.dart | 51 ++++++------ .../open_dapp/widgets/typed_message_info.dart | 13 ++-- .../send_nft/widgets/transaction_info.dart | 19 ++--- .../dapp_hooks/widgets/auto_claim_dialog.dart | 73 ++++++++---------- .../location_permission_bottom_sheet.dart | 77 +++++++++---------- ...s_background_fetch_alert_bottom_sheet.dart | 53 ++++++------- .../widgets/background_fetch_dialog.dart | 53 ++++++------- 10 files changed, 181 insertions(+), 219 deletions(-) diff --git a/lib/common/components/recent_transactions/widgets/speed_up_cancel_bottom_sheet_info.dart b/lib/common/components/recent_transactions/widgets/speed_up_cancel_bottom_sheet_info.dart index 44744e81..0764edaf 100644 --- a/lib/common/components/recent_transactions/widgets/speed_up_cancel_bottom_sheet_info.dart +++ b/lib/common/components/recent_transactions/widgets/speed_up_cancel_bottom_sheet_info.dart @@ -21,28 +21,25 @@ class SpeedUpCancelBottomSheetInfo extends ConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { return Column( children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 6), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - ...notice(context), - SingleLineInfoItem( - title: 'estimated_fee', - value: MXCFormatter.formatNumberForUI( - estimatedFee, - ), - hint: symbol, + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ...notice(context), + SingleLineInfoItem( + title: 'estimated_fee', + value: MXCFormatter.formatNumberForUI( + estimatedFee, ), - SingleLineInfoItem( - title: 'max_fee', - value: MXCFormatter.formatNumberForUI( - maxFee, - ), - hint: symbol, + hint: symbol, + ), + SingleLineInfoItem( + title: 'max_fee', + value: MXCFormatter.formatNumberForUI( + maxFee, ), - ], - ), + hint: symbol, + ), + ], ), const SizedBox(height: Sizes.spaceXSmall), submitButton(context), diff --git a/lib/features/dapps/subfeatures/open_dapp/widgets/add_asset_info.dart b/lib/features/dapps/subfeatures/open_dapp/widgets/add_asset_info.dart index 44882ddf..7b27bb82 100644 --- a/lib/features/dapps/subfeatures/open_dapp/widgets/add_asset_info.dart +++ b/lib/features/dapps/subfeatures/open_dapp/widgets/add_asset_info.dart @@ -22,13 +22,10 @@ class AddAssetInfo extends ConsumerWidget { final presenter = ref.read(openDAppPageContainer.actions); return Column( children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 6), - child: Column( - children: [ - ...tokenInfo(context, token), - ], - ), + Column( + children: [ + ...tokenInfo(context, token), + ], ), const SizedBox(height: 8), addTokenButton(context), diff --git a/lib/features/dapps/subfeatures/open_dapp/widgets/message_info.dart b/lib/features/dapps/subfeatures/open_dapp/widgets/message_info.dart index facead68..3651a41b 100644 --- a/lib/features/dapps/subfeatures/open_dapp/widgets/message_info.dart +++ b/lib/features/dapps/subfeatures/open_dapp/widgets/message_info.dart @@ -23,14 +23,11 @@ class MessageInfo extends ConsumerWidget { final presenter = ref.read(openDAppPageContainer.actions); return Column( children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 6), - child: Column( - children: [ - titleItem(context), - messageItem(context, presenter, message), - ], - ), + Column( + children: [ + titleItem(context), + messageItem(context, presenter, message), + ], ), const SizedBox(height: 8), signButton(context), diff --git a/lib/features/dapps/subfeatures/open_dapp/widgets/transaction_info.dart b/lib/features/dapps/subfeatures/open_dapp/widgets/transaction_info.dart index 6b24a148..14d69f2e 100644 --- a/lib/features/dapps/subfeatures/open_dapp/widgets/transaction_info.dart +++ b/lib/features/dapps/subfeatures/open_dapp/widgets/transaction_info.dart @@ -29,35 +29,32 @@ class TransactionInfo extends ConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { return Column( children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 6), - child: Column( - children: [ - amountItem(context), - SingleLineInfoItem( - title: 'from', - value: from, - ), - SingleLineInfoItem( - title: 'to', - value: to, - ), - SingleLineInfoItem( - title: 'estimated_fee', - value: MXCFormatter.formatNumberForUI( - estimatedFee, - ), - hint: symbol, + Column( + children: [ + amountItem(context), + SingleLineInfoItem( + title: 'from', + value: from, + ), + SingleLineInfoItem( + title: 'to', + value: to, + ), + SingleLineInfoItem( + title: 'estimated_fee', + value: MXCFormatter.formatNumberForUI( + estimatedFee, ), - SingleLineInfoItem( - title: 'max_fee', - value: MXCFormatter.formatNumberForUI( - maxFee, - ), - hint: symbol, + hint: symbol, + ), + SingleLineInfoItem( + title: 'max_fee', + value: MXCFormatter.formatNumberForUI( + maxFee, ), - ], - ), + hint: symbol, + ), + ], ), const SizedBox(height: 8), transactionButton(context), diff --git a/lib/features/dapps/subfeatures/open_dapp/widgets/typed_message_info.dart b/lib/features/dapps/subfeatures/open_dapp/widgets/typed_message_info.dart index 4a116d6c..06018054 100644 --- a/lib/features/dapps/subfeatures/open_dapp/widgets/typed_message_info.dart +++ b/lib/features/dapps/subfeatures/open_dapp/widgets/typed_message_info.dart @@ -25,14 +25,11 @@ class TypeMessageInfo extends ConsumerWidget { final presenter = ref.read(openDAppPageContainer.actions); return Column( children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 6), - child: Column( - children: [ - titleItem(context), - ...infoItems(context, presenter), - ], - ), + Column( + children: [ + titleItem(context), + ...infoItems(context, presenter), + ], ), const SizedBox(height: 8), signButton(context), diff --git a/lib/features/portfolio/subfeatures/nft/send_nft/widgets/transaction_info.dart b/lib/features/portfolio/subfeatures/nft/send_nft/widgets/transaction_info.dart index 3ccda338..2f772bf4 100644 --- a/lib/features/portfolio/subfeatures/nft/send_nft/widgets/transaction_info.dart +++ b/lib/features/portfolio/subfeatures/nft/send_nft/widgets/transaction_info.dart @@ -32,17 +32,14 @@ class TransactionInfo extends StatelessWidget { Widget build(BuildContext context) { return Column( children: [ - Padding( - padding: const EdgeInsets.symmetric(horizontal: 6), - child: Column( - children: [ - imageItem(context, nft), - addressItem(context, 'from', from), - addressItem(context, 'to', to), - if (TransactionProcessType.confirm != processType) - priceItem(context, 'estimated_fee', estimatedFee, symbol), - ], - ), + Column( + children: [ + imageItem(context, nft), + addressItem(context, 'from', from), + addressItem(context, 'to', to), + if (TransactionProcessType.confirm != processType) + priceItem(context, 'estimated_fee', estimatedFee, symbol), + ], ), const SizedBox(height: 8), transactionButton(context), diff --git a/lib/features/settings/subfeatures/dapp_hooks/widgets/auto_claim_dialog.dart b/lib/features/settings/subfeatures/dapp_hooks/widgets/auto_claim_dialog.dart index bb24c561..4cbfaebc 100644 --- a/lib/features/settings/subfeatures/dapp_hooks/widgets/auto_claim_dialog.dart +++ b/lib/features/settings/subfeatures/dapp_hooks/widgets/auto_claim_dialog.dart @@ -12,46 +12,41 @@ Future showAutoClaimExecutionAlertDialog( bottomSheetTitle: 'auto_claim_execution_dialog_title', hasCloseButton: false, widgets: [ - Padding( - padding: const EdgeInsetsDirectional.symmetric( - horizontal: Sizes.spaceXLarge, - ), - child: Column( - children: [ - Text( - translate( - 'auto_claim_execution_dialog_text', - ), - style: FontTheme.of(context, listen: false) - .body1 - .primary() - .copyWith(), - softWrap: true, - textAlign: TextAlign.justify, + Column( + children: [ + Text( + translate( + 'auto_claim_execution_dialog_text', ), - const SizedBox( - height: Sizes.spaceNormal, - ), - MxcButton.secondary( - key: const ValueKey('cancelButton'), - title: translate('cancel'), - onTap: () => Navigator.of(context).pop(false), - size: MXCWalletButtonSize.xl, - ), - const SizedBox( - height: Sizes.spaceNormal, - ), - MxcButton.primary( - key: const ValueKey('executeButton'), - title: translate('execute'), - onTap: () { - executeAutoClaim(); - Navigator.of(context).pop(true); - }, - size: MXCWalletButtonSize.xl, - ), - ], - ), + style: FontTheme.of(context, listen: false) + .body1 + .primary() + .copyWith(), + softWrap: true, + textAlign: TextAlign.justify, + ), + const SizedBox( + height: Sizes.spaceNormal, + ), + MxcButton.secondary( + key: const ValueKey('cancelButton'), + title: translate('cancel'), + onTap: () => Navigator.of(context).pop(false), + size: MXCWalletButtonSize.xl, + ), + const SizedBox( + height: Sizes.spaceNormal, + ), + MxcButton.primary( + key: const ValueKey('executeButton'), + title: translate('execute'), + onTap: () { + executeAutoClaim(); + Navigator.of(context).pop(true); + }, + size: MXCWalletButtonSize.xl, + ), + ], ) ], ); diff --git a/lib/features/settings/subfeatures/dapp_hooks/widgets/location_permission_bottom_sheet.dart b/lib/features/settings/subfeatures/dapp_hooks/widgets/location_permission_bottom_sheet.dart index c011a7d1..94772eb7 100644 --- a/lib/features/settings/subfeatures/dapp_hooks/widgets/location_permission_bottom_sheet.dart +++ b/lib/features/settings/subfeatures/dapp_hooks/widgets/location_permission_bottom_sheet.dart @@ -14,48 +14,43 @@ Future showLocationPermissionBottomSheet({ bottomSheetTitle: 'location_permission_required_title', hasCloseButton: false, widgets: [ - Padding( - padding: const EdgeInsetsDirectional.symmetric( - horizontal: Sizes.spaceXLarge, - ), - child: Column( - children: [ - Text( - translate( - 'location_permission_required_text', - ), - style: FontTheme.of(context, listen: false) - .body1 - .primary() - .copyWith(), - softWrap: true, - textAlign: TextAlign.justify, + Column( + children: [ + Text( + translate( + 'location_permission_required_text', ), - const SizedBox( - height: Sizes.spaceNormal, - ), - MxcButton.primary( - key: const ValueKey('openLocationSettingsButton'), - title: translate('open_settings'), - onTap: () { - openLocationSettings(); - Navigator.of(context).pop(true); - }, - size: MXCWalletButtonSize.xl, - ), - const SizedBox( - height: Sizes.spaceNormal, - ), - MxcButton.secondary( - key: const ValueKey('cancelButton'), - title: translate('cancel'), - onTap: () { - Navigator.of(context).pop(true); - }, - size: MXCWalletButtonSize.xl, - ), - ], - ), + style: FontTheme.of(context, listen: false) + .body1 + .primary() + .copyWith(), + softWrap: true, + textAlign: TextAlign.justify, + ), + const SizedBox( + height: Sizes.spaceNormal, + ), + MxcButton.primary( + key: const ValueKey('openLocationSettingsButton'), + title: translate('open_settings'), + onTap: () { + openLocationSettings(); + Navigator.of(context).pop(true); + }, + size: MXCWalletButtonSize.xl, + ), + const SizedBox( + height: Sizes.spaceNormal, + ), + MxcButton.secondary( + key: const ValueKey('cancelButton'), + title: translate('cancel'), + onTap: () { + Navigator.of(context).pop(true); + }, + size: MXCWalletButtonSize.xl, + ), + ], ), ], ); diff --git a/lib/features/settings/subfeatures/dapp_hooks/widgets/wifi_hooks_background_fetch_alert_bottom_sheet.dart b/lib/features/settings/subfeatures/dapp_hooks/widgets/wifi_hooks_background_fetch_alert_bottom_sheet.dart index 5b1d60a5..eff71e39 100644 --- a/lib/features/settings/subfeatures/dapp_hooks/widgets/wifi_hooks_background_fetch_alert_bottom_sheet.dart +++ b/lib/features/settings/subfeatures/dapp_hooks/widgets/wifi_hooks_background_fetch_alert_bottom_sheet.dart @@ -13,36 +13,31 @@ Future showWiFiHooksBackgroundFetchAlertBottomSheet({ bottomSheetTitle: 'background_fetch_notice_title', hasCloseButton: false, widgets: [ - Padding( - padding: const EdgeInsetsDirectional.symmetric( - horizontal: Sizes.spaceXLarge, - ), - child: Column( - children: [ - Text( - translate( - 'wifi_location_background_fetch_notice_text', - ), - style: FontTheme.of(context, listen: false) - .body1 - .primary() - .copyWith(), - softWrap: true, - textAlign: TextAlign.justify, + Column( + children: [ + Text( + translate( + 'wifi_location_background_fetch_notice_text', ), - const SizedBox( - height: Sizes.spaceNormal, - ), - MxcButton.primary( - key: const ValueKey('acknowledgeButton'), - title: translate('acknowledge'), - onTap: () { - Navigator.of(context).pop(true); - }, - size: MXCWalletButtonSize.xl, - ), - ], - ), + style: FontTheme.of(context, listen: false) + .body1 + .primary() + .copyWith(), + softWrap: true, + textAlign: TextAlign.justify, + ), + const SizedBox( + height: Sizes.spaceNormal, + ), + MxcButton.primary( + key: const ValueKey('acknowledgeButton'), + title: translate('acknowledge'), + onTap: () { + Navigator.of(context).pop(true); + }, + size: MXCWalletButtonSize.xl, + ), + ], ), ], ); diff --git a/lib/features/settings/subfeatures/notifications/widgets/background_fetch_dialog.dart b/lib/features/settings/subfeatures/notifications/widgets/background_fetch_dialog.dart index d7f73880..351493ff 100644 --- a/lib/features/settings/subfeatures/notifications/widgets/background_fetch_dialog.dart +++ b/lib/features/settings/subfeatures/notifications/widgets/background_fetch_dialog.dart @@ -13,36 +13,31 @@ Future showBackgroundFetchAlertDialog({ bottomSheetTitle: 'background_fetch_notice_title', hasCloseButton: false, widgets: [ - Padding( - padding: const EdgeInsetsDirectional.symmetric( - horizontal: Sizes.spaceXLarge, - ), - child: Column( - children: [ - Text( - translate( - 'background_fetch_notice_text', - ), - style: FontTheme.of(context, listen: false) - .body1 - .primary() - .copyWith(), - softWrap: true, - textAlign: TextAlign.justify, + Column( + children: [ + Text( + translate( + 'background_fetch_notice_text', ), - const SizedBox( - height: Sizes.spaceNormal, - ), - MxcButton.primary( - key: const ValueKey('acknowledgeButton'), - title: translate('acknowledge'), - onTap: () { - Navigator.of(context).pop(true); - }, - size: MXCWalletButtonSize.xl, - ), - ], - ), + style: FontTheme.of(context, listen: false) + .body1 + .primary() + .copyWith(), + softWrap: true, + textAlign: TextAlign.justify, + ), + const SizedBox( + height: Sizes.spaceNormal, + ), + MxcButton.primary( + key: const ValueKey('acknowledgeButton'), + title: translate('acknowledge'), + onTap: () { + Navigator.of(context).pop(true); + }, + size: MXCWalletButtonSize.xl, + ), + ], ), ], ); From 43a5c33b57db57d13cd4b54574e7fc63d262a8b7 Mon Sep 17 00:00:00 2001 From: reasje Date: Sat, 14 Dec 2024 20:18:05 +0330 Subject: [PATCH 04/24] config: Update compile & target sdk reference --- android/app/build.gradle | 4 ++-- android/build.gradle | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 9b1ccb08..07a4d1cc 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -35,7 +35,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 34 + compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion "33.0.1" ndkVersion flutter.ndkVersion @@ -60,7 +60,7 @@ android { // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. minSdkVersion 21 - targetSdkVersion 34 + targetSdkVersion rootProject.ext.targetSdkVersion versionCode System.getenv('VERSION_CODE')?.hashCode()?.abs() ?: 404 versionName flutterVersionName } diff --git a/android/build.gradle b/android/build.gradle index 686cfb83..7338e670 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -24,6 +24,11 @@ allprojects { } } +ext { + compileSdkVersion = 34 + targetSdkVersion = 34 +} + rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" From 2ce99339496819badaf7617fc5797d2a791b5de6 Mon Sep 17 00:00:00 2001 From: reasje Date: Sat, 14 Dec 2024 20:51:51 +0330 Subject: [PATCH 05/24] fix: Update BG tasks ids --- ios/Runner/Info.plist | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 05c51b51..027124c4 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -5,10 +5,10 @@ BGTaskSchedulerPermittedIdentifiers com.transistorsoft.fetch - com.moonchain.mxc.notificationsTask - com.moonchain.mxc.wifiHooksTask - com.moonchain.mxc.minerAutoClaimTask - com.moonchain.mxc.blueberryAutoSyncTask + com.transistorsoft.notificationsTask + com.transistorsoft.wifiHooksTask + com.transistorsoft.minerAutoClaimTask + com.transistorsoft.blueberryAutoSyncTask CADisableMinimumFrameDurationOnPhone From aa612bd03259e6b3cb7743f567eec056e8d2bb57 Mon Sep 17 00:00:00 2001 From: reasje Date: Mon, 16 Dec 2024 07:37:51 +0330 Subject: [PATCH 06/24] feat: Bump BG service version --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index d93f8ff0..d54f1ed5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -37,7 +37,7 @@ dependencies: app_settings: ^5.1.1 appinio_social_share: path: packages/flutter_packages/packages/appinio_social_share - background_fetch: ^1.2.1 + background_fetch: ^1.3.7 cached_network_image: ^3.4.1 clipboard: ^0.1.3 collection: ^1.17.0 From bea5629dd1a225188685b66b5a8db6d7f5b21cc9 Mon Sep 17 00:00:00 2001 From: reasje Date: Mon, 16 Dec 2024 07:39:13 +0330 Subject: [PATCH 07/24] fix: Comment google app id force removal --- android/app/src/main/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 25acc46b..73bc88fd 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -41,7 +41,7 @@ - + + + + NSPrivacyAccessedAPITypes + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + + diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 8b1f92c6..c7f09fea 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 0056F8382D0C2A050080BAFB /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 0056F8372D0C2A050080BAFB /* PrivacyInfo.xcprivacy */; }; 04AD4F67A3C80B4D8D21E1D5 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9AA8843D70E9DCF281E30EE /* Pods_Runner.framework */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; @@ -31,6 +32,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 0056F8372D0C2A050080BAFB /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 00B871672B0DE8FE007D0206 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; @@ -96,6 +98,7 @@ 97C146E51CF9000F007C117D = { isa = PBXGroup; children = ( + 0056F8372D0C2A050080BAFB /* PrivacyInfo.xcprivacy */, 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, @@ -193,6 +196,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 0056F8382D0C2A050080BAFB /* PrivacyInfo.xcprivacy in Resources */, 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, From 30a60096e44cea4320836d976de771d4c0da8946 Mon Sep 17 00:00:00 2001 From: reasje Date: Mon, 16 Dec 2024 07:49:29 +0330 Subject: [PATCH 09/24] fix: Update shared --- packages/shared | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared b/packages/shared index fb120b58..9e6a991f 160000 --- a/packages/shared +++ b/packages/shared @@ -1 +1 @@ -Subproject commit fb120b585963d4d6fc28e7e9b15f244a482d5313 +Subproject commit 9e6a991fa67b9000da48ad45a351cd9d80edf3c1 From 606830d361b4482783405c32ae7f627ed1f22f78 Mon Sep 17 00:00:00 2001 From: reasje Date: Mon, 16 Dec 2024 07:53:40 +0330 Subject: [PATCH 10/24] config: Bump App version --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index d54f1ed5..5a40e484 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -19,7 +19,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.4.1 +version: 1.4.2 environment: From 9e1b578c5f5485d841e5b0b4aee5ba0f146f591e Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 17 Dec 2024 08:24:04 +0330 Subject: [PATCH 11/24] fix: Firebase config bug --- lib/core/src/firebase/moonchain_wallet_firebase.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/core/src/firebase/moonchain_wallet_firebase.dart b/lib/core/src/firebase/moonchain_wallet_firebase.dart index 8dcbb052..f1217161 100644 --- a/lib/core/src/firebase/moonchain_wallet_firebase.dart +++ b/lib/core/src/firebase/moonchain_wallet_firebase.dart @@ -17,8 +17,7 @@ class MoonchainWalletFireBase { static int buildTap = 0; static Future initializeFirebase() async { - return await Firebase.initializeApp( - options: DefaultFirebaseOptions.currentPlatform); + return await Firebase.initializeApp(); } // Listening to the foreground messages From efadca586c7b81b3cd0ba3b52026b3c2c906044d Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 17 Dec 2024 08:39:07 +0330 Subject: [PATCH 12/24] fix: Add more logs to background service --- .../background_process/notifications_service.dart | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/core/src/background_process/notifications_service.dart b/lib/core/src/background_process/notifications_service.dart index 518f0cac..f8c31a55 100644 --- a/lib/core/src/background_process/notifications_service.dart +++ b/lib/core/src/background_process/notifications_service.dart @@ -1,4 +1,5 @@ import 'package:background_fetch/background_fetch.dart'; +import 'package:moonchain_wallet/app/logger.dart'; import 'package:moonchain_wallet/core/core.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:mxc_logic/mxc_logic.dart'; @@ -48,20 +49,24 @@ class NotificationsService { final lowBatteryEnabled = periodicalCallData.lowBatteryEnabled; // Make sure user is logged in + print("isLoggedIn : $isLoggedIn, serviceEnabled : $serviceEnabled" ); if (isLoggedIn && MXCChains.isMXCChains(chainId) && serviceEnabled) { await MoonchainWalletNotification() .setupFlutterNotifications(shouldInitFirebase: false); + print('lowBalanceLimitEnabled: $lowBalanceLimitEnabled'); if (lowBalanceLimitEnabled) { await backgroundFetchConfigUseCase.checkLowBalance( account!, lowBalanceLimit); } + print('expectedTransactionFeeEnabled: $expectedTransactionFeeEnabled'); if (expectedTransactionFeeEnabled) { await backgroundFetchConfigUseCase .checkTransactionFee(expectedTransactionFee); } + print('expectedEpochOccurrenceEnabled: $expectedEpochOccurrenceEnabled'); if (expectedEpochOccurrenceEnabled) { periodicalCallData = await backgroundFetchConfigUseCase.checkEpochOccur( @@ -71,30 +76,37 @@ class NotificationsService { chainId); } + print('activityReminderEnabled: $activityReminderEnabled'); if (activityReminderEnabled) { await blueberryRingBackgroundNotificationsUseCase .checkActivityReminder(); } + print('sleepInsightEnabled: $sleepInsightEnabled'); if (sleepInsightEnabled) { await blueberryRingBackgroundNotificationsUseCase.checkSleepInsight(); } + print('heartAlertEnabled: $heartAlertEnabled'); if (heartAlertEnabled) { await blueberryRingBackgroundNotificationsUseCase.checkHeartAlert(); } + print('lowBatteryEnabled: $lowBatteryEnabled'); if (lowBatteryEnabled) { await blueberryRingBackgroundNotificationsUseCase.checkLowBattery(); } + print('periodicalCallData: ${periodicalCallData.toString()}'); backgroundFetchConfigUseCase.updateItem(periodicalCallData); BackgroundFetch.finish(taskId); } else { + print("Terminating background service because conditions doesn't meet" ); // terminate background fetch BackgroundFetch.stop(taskId); } } catch (e) { + print("Background fetch ERROR : $e" ); BackgroundFetch.finish(taskId); } } From 50ea9625c31fb0be2883503285c6424878146db2 Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 17 Dec 2024 08:40:07 +0330 Subject: [PATCH 13/24] config: Bump version --- pubspec.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 5a40e484..da52429e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -19,7 +19,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.4.2 +version: 1.4.3 environment: @@ -51,7 +51,9 @@ dependencies: eth_sig_util: ^0.0.9 f_logs: ^2.0.1 favicon: ^1.1.2 - firebase_core: ^3.8.0 + firebase_analytics: ^11.3.6 + firebase_core: ^3.8.1 + firebase_crashlytics: ^4.2.0 firebase_messaging: ^15.1.5 fl_chart: ^0.69.0 fl_shared_link: @@ -66,7 +68,7 @@ dependencies: flutter_i18n: ^0.35.1 flutter_inappwebview: ^6.1.5 flutter_local_notifications: ^18.0.1 - flutter_mailer: ^2.0.2 + flutter_mailer: ^2.1.2 flutter_svg: ^2.0.1 geolocator: ^10.1.0 google_sign_in: ^6.1.5 From 33758b2210f653d7b1bdf9fefe613707c24fdbdd Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 17 Dec 2024 08:42:02 +0330 Subject: [PATCH 14/24] fix: Add stacktrace to error report --- lib/core/src/background_process/notifications_service.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/core/src/background_process/notifications_service.dart b/lib/core/src/background_process/notifications_service.dart index f8c31a55..640b768c 100644 --- a/lib/core/src/background_process/notifications_service.dart +++ b/lib/core/src/background_process/notifications_service.dart @@ -105,8 +105,9 @@ class NotificationsService { // terminate background fetch BackgroundFetch.stop(taskId); } - } catch (e) { + } catch (e, s) { print("Background fetch ERROR : $e" ); + print("Background fetch stacktrace : $s" ); BackgroundFetch.finish(taskId); } } From 305610e710733cf9f1a756ec431b60b4efaeb1dd Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 17 Dec 2024 18:08:02 +0330 Subject: [PATCH 15/24] config: Update gradle & AGP version for Crashlytics fix --- android/build.gradle | 2 +- android/gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 7338e670..1e3526c2 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.2.0' + classpath 'com.android.tools.build:gradle:8.1.2' // START: FlutterFire Configuration // classpath 'com.google.gms:google-services:4.3.10' // END: FlutterFire Configuration diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 3c472b99..7bb2df6b 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip From b60e772988bebd5ea9cf5be097cff065c25a370e Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 17 Dec 2024 18:08:57 +0330 Subject: [PATCH 16/24] fix: Build errors after gradle upgrade --- android/build.gradle | 12 ++++++++ android/gradle.properties | 1 + pubspec.lock | 64 +++++++++++++++++++++++++++++++-------- 3 files changed, 65 insertions(+), 12 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 1e3526c2..bb70c8ff 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -22,6 +22,18 @@ allprojects { url "${project(':background_fetch').projectDir}/libs" } } + + subprojects { + afterEvaluate { project -> + if (project.hasProperty('android')) { + project.android { + if (namespace == null) { + namespace project.group + } + } + } + } + } } ext { diff --git a/android/gradle.properties b/android/gradle.properties index 94adc3a3..842dce90 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,4 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true +kotlin.jvm.target.validation.mode = IGNORE \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index 8bf8db49..b195920b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -21,10 +21,10 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: "71c01c1998c40b3af1944ad0a5f374b4e6fef7f3d2df487f3970dbeadaeb25a1" + sha256: eae3133cbb06de9205899b822e3897fc6a8bc278ad4c944b4ce612689369694b url: "https://pub.dev" source: hosted - version: "1.3.46" + version: "1.3.47" analyzer: dependency: transitive description: @@ -92,10 +92,10 @@ packages: dependency: "direct main" description: name: background_fetch - sha256: f70b28a0f7a3156195e9742229696f004ea3bf10f74039b7bf4c78a74fbda8a4 + sha256: e9f26ae54d88310b7ac2a68f2f9fcee0081a4d5f11100f233a70702021e7ac4f url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.7" bip32: dependency: transitive description: @@ -399,30 +399,70 @@ packages: url: "https://pub.dev" source: hosted version: "7.0.1" + firebase_analytics: + dependency: "direct main" + description: + name: firebase_analytics + sha256: "366140abb55418ea23060b779893fa997c2d8e1974a4d1cc4d9590933b65c5fd" + url: "https://pub.dev" + source: hosted + version: "11.3.6" + firebase_analytics_platform_interface: + dependency: transitive + description: + name: firebase_analytics_platform_interface + sha256: "8e987cf977c0c8f4ad02d9950a9b25b1a9606899f37b66a322a43af05be0246b" + url: "https://pub.dev" + source: hosted + version: "4.2.8" + firebase_analytics_web: + dependency: transitive + description: + name: firebase_analytics_web + sha256: "0b64ef9060d394bba3d3b4777f49ee098efeeea7b0afb04663c956de6a3da170" + url: "https://pub.dev" + source: hosted + version: "0.5.10+5" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: "2438a75ad803e818ad3bd5df49137ee619c46b6fc7101f4dbc23da07305ce553" + sha256: fef81a53ba1ca618def1f8bef4361df07968434e62cb204c1fb90bb880a03da2 url: "https://pub.dev" source: hosted - version: "3.8.0" + version: "3.8.1" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface - sha256: e30da58198a6d4b49d5bce4e852f985c32cb10db329ebef9473db2b9f09ce810 + sha256: b94b217e3ad745e784960603d33d99471621ecca151c99c670869b76e50ad2a6 url: "https://pub.dev" source: hosted - version: "5.3.0" + version: "5.3.1" firebase_core_web: dependency: transitive description: name: firebase_core_web - sha256: f967a7138f5d2ffb1ce15950e2a382924239eaa521150a8f144af34e68b3b3e5 + sha256: "9e69806bb3d905aeec3c1242e0e1475de6ea6d48f456af29d598fb229a2b4e5e" + url: "https://pub.dev" + source: hosted + version: "2.18.2" + firebase_crashlytics: + dependency: "direct main" + description: + name: firebase_crashlytics + sha256: e235c8452d5622fc271404592388fde179e4b62c50e777ad3c8c3369296104ed url: "https://pub.dev" source: hosted - version: "2.18.1" + version: "4.2.0" + firebase_crashlytics_platform_interface: + dependency: transitive + description: + name: firebase_crashlytics_platform_interface + sha256: "4ddadf44ed0a202f3acad053f12c083877940fa8cc1a9f747ae09e1ef4372160" + url: "https://pub.dev" + source: hosted + version: "3.7.0" firebase_messaging: dependency: "direct main" description: @@ -627,10 +667,10 @@ packages: dependency: "direct main" description: name: flutter_mailer - sha256: a935e9caa842877e8ed56109afb75b86e6488edbcd4696a5ac02b327a48fcd8a + sha256: "4fffaa35e911ff5ec2e5a4ebbca62c372e99a154eb3bb2c0bf79f09adf6ecf4c" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" flutter_plugin_android_lifecycle: dependency: transitive description: From d2114f7f9a8f38225946f42098837a34fdeea59c Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 17 Dec 2024 18:09:16 +0330 Subject: [PATCH 17/24] fix: Add namespace for build error --- android/app/build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/app/build.gradle b/android/app/build.gradle index 07a4d1cc..5d6438cc 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -35,6 +35,8 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { + namespace "com.moonchain.app" + compileSdkVersion rootProject.ext.compileSdkVersion buildToolsVersion "33.0.1" ndkVersion flutter.ndkVersion From 0c92765bf53302f368f36b9fd587df5bc4237184 Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 17 Dec 2024 18:09:46 +0330 Subject: [PATCH 18/24] fix: Update project java version for build error --- android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 5d6438cc..9433f5cd 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -104,7 +104,7 @@ android { } kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.toString() + jvmTarget = JavaVersion.VERSION_17.toString() } } From 0f89ffa8ff4a2575c54035db685ce52402034008 Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 17 Dec 2024 18:10:38 +0330 Subject: [PATCH 19/24] fix: Re-config Firebase to include crashlytics --- android/app/google-services.json | 26 +++++++++++++++++++++++++- firebase.json | 1 + ios/Runner.xcodeproj/project.pbxproj | 19 +++++++++++++++++++ ios/Runner/GoogleService-Info.plist | 2 +- 4 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 firebase.json diff --git a/android/app/google-services.json b/android/app/google-services.json index e336ba86..c4eebb08 100644 --- a/android/app/google-services.json +++ b/android/app/google-services.json @@ -2,7 +2,7 @@ "project_info": { "project_number": "810578982053", "project_id": "moonchain-app", - "storage_bucket": "moonchain-app.appspot.com" + "storage_bucket": "moonchain-app.firebasestorage.app" }, "client": [ { @@ -13,6 +13,30 @@ } }, "oauth_client": [ + { + "client_id": "810578982053-ettvcq9ao4l1idjaap0vbqaq7lp906hh.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "com.moonchain.app", + "certificate_hash": "b3d8f034c8319b877f83a2a44ff9141325ded9c3" + } + }, + { + "client_id": "810578982053-lcmvcramqf6cmnl3o60m5tbe91kfto89.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "com.moonchain.app", + "certificate_hash": "5c3aaff06b031aa5f90f61c1e1d3b79fc0294af0" + } + }, + { + "client_id": "810578982053-q4cakrdg97b716dvbdqkrcpv87cl6d69.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "com.moonchain.app", + "certificate_hash": "2d7ddbcda8fff7b9cbc2b55d3b01e9ddc77c20e4" + } + }, { "client_id": "810578982053-5mthh5ep4k1601komn39hu7c4biu4chb.apps.googleusercontent.com", "client_type": 3 diff --git a/firebase.json b/firebase.json new file mode 100644 index 00000000..60754131 --- /dev/null +++ b/firebase.json @@ -0,0 +1 @@ +{"flutter":{"platforms":{"android":{"default":{"projectId":"moonchain-app","appId":"1:810578982053:android:dbfbe51474fccc2b21094c","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"moonchain-app","appId":"1:810578982053:ios:bc715e679aa91fe221094c","uploadDebugSymbols":true,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"moonchain-app","configurations":{"android":"1:810578982053:android:dbfbe51474fccc2b21094c","ios":"1:810578982053:ios:bc715e679aa91fe221094c"}}}}}} \ No newline at end of file diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index c7f09fea..66b9714e 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -148,6 +148,7 @@ 3B06AD1E1E4923F5004D2608 /* Thin Binary */, A5618D03B0CF4532EDC74EED /* [CP] Embed Pods Frameworks */, 3EE0B9E34511D387BB0754AA /* [CP] Copy Pods Resources */, + 5B64F37869CECD4392AE2CE2 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */, ); buildRules = ( ); @@ -241,6 +242,24 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; showEnvVarsInLog = 0; }; + 5B64F37869CECD4392AE2CE2 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\""; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --platform=ios --apple-project-path=${SRCROOT} --env-platform-name=${PLATFORM_NAME} --env-configuration=${CONFIGURATION} --env-project-dir=${PROJECT_DIR} --env-built-products-dir=${BUILT_PRODUCTS_DIR} --env-dwarf-dsym-folder-path=${DWARF_DSYM_FOLDER_PATH} --env-dwarf-dsym-file-name=${DWARF_DSYM_FILE_NAME} --env-infoplist-path=${INFOPLIST_PATH} --default-config=default\n"; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; diff --git a/ios/Runner/GoogleService-Info.plist b/ios/Runner/GoogleService-Info.plist index ae8c6433..cc42f8fd 100644 --- a/ios/Runner/GoogleService-Info.plist +++ b/ios/Runner/GoogleService-Info.plist @@ -19,7 +19,7 @@ PROJECT_ID moonchain-app STORAGE_BUCKET - moonchain-app.appspot.com + moonchain-app.firebasestorage.app IS_ADS_ENABLED IS_ANALYTICS_ENABLED From c0ac79f0285220ad3ca3d26c531af7ca4e1e04e0 Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 17 Dec 2024 18:10:58 +0330 Subject: [PATCH 20/24] fix: Included firebase dependency --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index bb70c8ff..508158f7 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,7 +8,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:8.1.2' // START: FlutterFire Configuration - // classpath 'com.google.gms:google-services:4.3.10' + classpath 'com.google.gms:google-services:4.3.15' // END: FlutterFire Configuration classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } From 8478df6802011f5f478ff40c607922adac7598eb Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 17 Dec 2024 18:11:27 +0330 Subject: [PATCH 21/24] fix: Update firebase options --- lib/core/src/firebase/firebase_options.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/src/firebase/firebase_options.dart b/lib/core/src/firebase/firebase_options.dart index 551202d9..549d6551 100644 --- a/lib/core/src/firebase/firebase_options.dart +++ b/lib/core/src/firebase/firebase_options.dart @@ -1,5 +1,5 @@ // File generated by FlutterFire CLI. -// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members +// ignore_for_file: type=lint import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform; @@ -54,7 +54,7 @@ class DefaultFirebaseOptions { appId: '1:810578982053:android:dbfbe51474fccc2b21094c', messagingSenderId: '810578982053', projectId: 'moonchain-app', - storageBucket: 'moonchain-app.appspot.com', + storageBucket: 'moonchain-app.firebasestorage.app', ); static const FirebaseOptions ios = FirebaseOptions( @@ -62,7 +62,7 @@ class DefaultFirebaseOptions { appId: '1:810578982053:ios:bc715e679aa91fe221094c', messagingSenderId: '810578982053', projectId: 'moonchain-app', - storageBucket: 'moonchain-app.appspot.com', + storageBucket: 'moonchain-app.firebasestorage.app', androidClientId: '810578982053-ef7chugg2fct7l6io3d7tis321hi1hnd.apps.googleusercontent.com', iosClientId: '810578982053-p196bn8p9ipg3709v4ftk2a28fcvi6ka.apps.googleusercontent.com', iosBundleId: 'com.moonchain.mxc', From 73945b0075c9c9b5089a7a9dac4a85894accf2b5 Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 17 Dec 2024 19:11:07 +0330 Subject: [PATCH 22/24] fix: Firebase init func --- lib/core/src/firebase/moonchain_wallet_firebase.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/core/src/firebase/moonchain_wallet_firebase.dart b/lib/core/src/firebase/moonchain_wallet_firebase.dart index f1217161..8dcbb052 100644 --- a/lib/core/src/firebase/moonchain_wallet_firebase.dart +++ b/lib/core/src/firebase/moonchain_wallet_firebase.dart @@ -17,7 +17,8 @@ class MoonchainWalletFireBase { static int buildTap = 0; static Future initializeFirebase() async { - return await Firebase.initializeApp(); + return await Firebase.initializeApp( + options: DefaultFirebaseOptions.currentPlatform); } // Listening to the foreground messages From e272b2fb5d59fcae6c6a7b3b4195b075c81cec58 Mon Sep 17 00:00:00 2001 From: reasje Date: Tue, 17 Dec 2024 19:11:46 +0330 Subject: [PATCH 23/24] feat: Add crashlytics crash reporting system --- lib/main.dart | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 244a3490..9286f2ae 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,4 +1,6 @@ import 'dart:async'; +import 'package:firebase_crashlytics/firebase_crashlytics.dart'; +import 'package:flutter/foundation.dart'; import 'package:moonchain_wallet/app/logger.dart'; import 'package:moonchain_wallet/common/common.dart'; import 'package:moonchain_wallet/core/core.dart'; @@ -24,13 +26,7 @@ Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async { print('Handling a background message ${message.messageId}'); } -void main() { - var onError = FlutterError.onError; - FlutterError.onError = (FlutterErrorDetails details) { - onError?.call(details); - reportErrorAndLog(details); - }; - +void main() async { runZoned( () async { WidgetsFlutterBinding.ensureInitialized(); @@ -38,6 +34,35 @@ void main() { await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ); + FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true); + + const fatalError = true; + var onError = FlutterError.onError; + // Non-async exceptions + FlutterError.onError = (errorDetails) { + onError?.call(errorDetails); + reportErrorAndLog(errorDetails); + if (fatalError) { + // If you want to record a "fatal" exception + FirebaseCrashlytics.instance.recordFlutterFatalError(errorDetails); + // ignore: dead_code + } else { + // If you want to record a "non-fatal" exception + FirebaseCrashlytics.instance.recordFlutterError(errorDetails); + } + }; + // Async exceptions + PlatformDispatcher.instance.onError = (error, stack) { + if (fatalError) { + // If you want to record a "fatal" exception + FirebaseCrashlytics.instance.recordError(error, stack, fatal: true); + // ignore: dead_code + } else { + // If you want to record a "non-fatal" exception + FirebaseCrashlytics.instance.recordError(error, stack); + } + return true; + }; FirebaseMessaging.onBackgroundMessage( _firebaseMessagingBackgroundHandler); From d6f2eac26cf8a3c5e6f8565cff12951dfe8da133 Mon Sep 17 00:00:00 2001 From: Sanghamitra Bhowmick <93600163+SanghamitraBhowmick1993@users.noreply.github.com> Date: Tue, 17 Dec 2024 21:54:40 +0530 Subject: [PATCH 24/24] Update pubspec.yaml --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index da52429e..30392b8d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -19,7 +19,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.4.3 +version: 1.4.4 environment: