diff --git a/lib/entities/default_settings_migration.dart b/lib/entities/default_settings_migration.dart index b08af431a..96c62b41b 100644 --- a/lib/entities/default_settings_migration.dart +++ b/lib/entities/default_settings_migration.dart @@ -599,6 +599,14 @@ Future defaultSettingsMigration( type: WalletType.arbitrum, currentNodePreferenceKey: PreferencesKey.currentArbitrumNodeIdKey, oldUri: ["arbitrum.nownodes.io"]); + break; + case 67: + _changeExchangeProviderAvailability( + sharedPreferences, + providerName: "LetsExchange", + enabled: true, + ); + break; default: break; } diff --git a/lib/main.dart b/lib/main.dart index d8a66241c..a8a3329f4 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -318,7 +318,7 @@ Future initializeAppConfigs({bool loadWallet = true}) async { payjoinSessionSource: payjoinSessionSource, anonpayInvoiceInfo: anonpayInvoiceInfo, havenSeedStore: havenSeedStore, - initialMigrationVersion: 66, + initialMigrationVersion: 67, ); } diff --git a/lib/utils/share_util.dart b/lib/utils/share_util.dart index 9fd2c5ebc..b1a73c9e0 100644 --- a/lib/utils/share_util.dart +++ b/lib/utils/share_util.dart @@ -30,22 +30,21 @@ class ShareUtil { static Rect _sharePosition(BuildContext context) { if (!context.mounted) { - return Rect.zero; + return const Rect.fromLTWH(0, 0, 1, 1); } + final screen = Offset.zero & MediaQuery.of(context).size; + final fallback = Rect.fromCenter(center: screen.center, width: 1, height: 1); + final renderObject = context.findRenderObject(); - if (renderObject is! RenderBox) { - return Rect.zero; + if (renderObject is! RenderBox || !renderObject.hasSize) { + return fallback; } final rect = renderObject.localToGlobal(Offset.zero) & renderObject.size; - // iOS requires sharePositionOrigin to lie fully within the source view's - // bounds; clip to the screen so an offset/oversized page rect doesn't spill - // past the edge and trigger a PlatformException on iPad. - final screen = Offset.zero & MediaQuery.of(context).size; final clipped = rect.intersect(screen); if (clipped.isEmpty) { - return Rect.zero; + return fallback; } return clipped; }