Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ PODS:
- Flutter
- flutter_nfc_kit (3.6.0):
- Flutter
- flutter_secure_storage (6.0.0):
- flutter_secure_storage_darwin (10.0.0):
- Flutter
- FlutterMacOS
- flutter_zxing (0.0.1):
- Flutter
- google_sign_in_ios (0.0.1):
Expand Down Expand Up @@ -163,7 +164,7 @@ DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_nfc_kit (from `.symlinks/plugins/flutter_nfc_kit/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- flutter_secure_storage_darwin (from `.symlinks/plugins/flutter_secure_storage_darwin/darwin`)
- flutter_zxing (from `.symlinks/plugins/flutter_zxing/ios`)
- google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
Expand Down Expand Up @@ -218,8 +219,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_native_splash/ios"
flutter_nfc_kit:
:path: ".symlinks/plugins/flutter_nfc_kit/ios"
flutter_secure_storage:
:path: ".symlinks/plugins/flutter_secure_storage/ios"
flutter_secure_storage_darwin:
:path: ".symlinks/plugins/flutter_secure_storage_darwin/darwin"
flutter_zxing:
:path: ".symlinks/plugins/flutter_zxing/ios"
google_sign_in_ios:
Expand Down Expand Up @@ -271,7 +272,7 @@ SPEC CHECKSUMS:
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf
flutter_nfc_kit: e1b71583eafd2c9650bc86844a7f2d185fb414f6
flutter_secure_storage: 1ed9476fba7e7a782b22888f956cce43e2c62f13
flutter_secure_storage_darwin: acdb3f316ed05a3e68f856e0353b133eec373a23
flutter_zxing: e8bcc43bd3056c70c271b732ed94e7a16fd62f93
google_sign_in_ios: b48bb9af78576358a168361173155596c845f0b9
GoogleSignIn: ce8c89bb9b37fb624b92e7514cc67335d1e277e4
Expand Down
24 changes: 12 additions & 12 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,11 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 137;
CURRENT_PROJECT_VERSION = 138;
DEVELOPMENT_TEAM = BX99T32YGS;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_NAME = 6.5.2;
FLUTTER_BUILD_NUMBER = 137;
FLUTTER_BUILD_NAME = 6.5.3;
FLUTTER_BUILD_NUMBER = 138;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = BULL;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance";
Expand All @@ -501,7 +501,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 6.5.2;
MARKETING_VERSION = 6.5.3;
PRODUCT_BUNDLE_IDENTIFIER = com.bullbitcoin.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand Down Expand Up @@ -679,11 +679,11 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 137;
CURRENT_PROJECT_VERSION = 138;
DEVELOPMENT_TEAM = BX99T32YGS;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_NAME = 6.5.2;
FLUTTER_BUILD_NUMBER = 137;
FLUTTER_BUILD_NAME = 6.5.3;
FLUTTER_BUILD_NUMBER = 138;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = BULL;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance";
Expand All @@ -692,7 +692,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 6.5.2;
MARKETING_VERSION = 6.5.3;
PRODUCT_BUNDLE_IDENTIFIER = com.bullbitcoin.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand All @@ -708,11 +708,11 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 137;
CURRENT_PROJECT_VERSION = 138;
DEVELOPMENT_TEAM = BX99T32YGS;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_NAME = 6.5.2;
FLUTTER_BUILD_NUMBER = 137;
FLUTTER_BUILD_NAME = 6.5.3;
FLUTTER_BUILD_NUMBER = 138;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = BULL;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance";
Expand All @@ -721,7 +721,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 6.5.2;
MARKETING_VERSION = 6.5.3;
PRODUCT_BUNDLE_IDENTIFIER = com.bullbitcoin.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand Down
7 changes: 5 additions & 2 deletions lib/core/storage/storage_locator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ import 'package:get_it/get_it.dart';
class StorageLocator {
static Future<void> registerDatasources(GetIt locator) async {
const secureStorage = FlutterSecureStorage(
aOptions: AndroidOptions(encryptedSharedPreferences: true),
// iOptions: IOSOptions(accessibility: KeychainAccessibility.first_unlock),
aOptions: AndroidOptions(),
iOptions: IOSOptions(
accessibility: KeychainAccessibility.first_unlock_this_device,
// This will ensure that secure storage can be used by background tasks while the phone is locked.
),
);
locator.registerLazySingleton<KeyValueStorageDatasource<String>>(
() => SecureStorageDatasourceImpl(secureStorage),
Expand Down
21 changes: 11 additions & 10 deletions lib/core/widgets/logout_confirmation_bottom_sheet.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:bb_mobile/core/themes/app_theme.dart';
import 'package:bb_mobile/core/utils/build_context_x.dart';
import 'package:bb_mobile/core/widgets/bottom_sheet/x.dart';
import 'package:bb_mobile/core/widgets/buttons/button.dart';
import 'package:bb_mobile/core/widgets/text/text.dart';
Expand Down Expand Up @@ -43,15 +44,13 @@ class LogoutConfirmationBottomSheet extends StatelessWidget {
Icon(Icons.logout, size: 48, color: context.appColors.primary),
const SizedBox(height: 16),
BBText(
'Confirm Logout',
style: context.font.headlineSmall?.copyWith(
fontWeight: .bold,
),
context.loc.logoutConfirmationTitle,
style: context.font.headlineSmall?.copyWith(fontWeight: .bold),
textAlign: .center,
),
const SizedBox(height: 8),
BBText(
'Are you sure you want to log out of your Bull Bitcoin account? You will need to log in again to access exchange features.',
context.loc.logoutConfirmationDescription,
style: context.font.bodyMedium?.copyWith(
color: context.appColors.secondary.withValues(alpha: 0.7),
),
Expand All @@ -64,22 +63,24 @@ class LogoutConfirmationBottomSheet extends StatelessWidget {
children: [
Expanded(
child: BBButton.small(
label: 'Cancel',
label: context.loc.logoutConfirmationCancel,
onPressed: () => Navigator.of(context).pop(),
bgColor: context.appColors.secondaryFixed,
outlined: true,
bgColor: Colors.transparent,
textColor: context.appColors.secondary,
borderColor: context.appColors.outline,
),
),
const SizedBox(width: 12),
Expanded(
child: BBButton.small(
label: 'Logout',
label: context.loc.logoutConfirmationLogout,
onPressed: () async {
Navigator.of(context).pop();
await onConfirm();
},
bgColor: context.appColors.text,
textColor: context.appColors.onPrimary,
bgColor: context.appColors.secondary,
textColor: context.appColors.onSecondary,
),
),
],
Expand Down
7 changes: 1 addition & 6 deletions lib/features/app_startup/ui/app_startup_widget.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:bb_mobile/core/seed/data/datasources/seed_datasource.dart';
import 'package:bb_mobile/core/themes/app_theme.dart';
import 'package:bb_mobile/core/utils/build_context_x.dart';
import 'package:bb_mobile/core/utils/constants.dart';
Expand Down Expand Up @@ -127,11 +126,7 @@ class AppStartupFailureScreen extends StatelessWidget {
subtitle: Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
e is SeedNotFoundException
? hasBackup
? context.loc.appStartupErrorMessageWithBackup
: context.loc.appStartupErrorMessageNoBackup
: e.toString(),
context.loc.appStartupErrorMessage,
style: context.font.bodyMedium?.copyWith(
color: context.appColors.secondary.withValues(
alpha: 0.7,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ class _ShowAnimatedQrViewState extends State<_ShowAnimatedQrView> {
children: [
QrImageView(
data: state.parts[state.currentIndex],
// ignore: deprecated_member_use
foregroundColor: context.appColors.secondary,
// This color must stay hardcoded and not adapt to the theme.
// ColdCard can read only QR with white background.
backgroundColor: context.appColors.onPrimaryFixed,
),
const Gap(16),
if (widget.showSlider) ...[
Expand Down
15 changes: 11 additions & 4 deletions lib/features/psbt_flow/show_psbt/show_psbt_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,14 @@ class ShowPsbtScreen extends StatelessWidget {
const Gap(16),
],

if (signerDevice != null)
if ([
SignerDeviceEntity.jade,
SignerDeviceEntity.krux,
SignerDeviceEntity.keystone,
SignerDeviceEntity.passport,
SignerDeviceEntity.seedsigner,
SignerDeviceEntity.specter,
].contains(signerDevice))
BBButton.small(
label: context.loc.psbtFlowInstructions,
onPressed: () {
Expand All @@ -66,8 +73,8 @@ class ShowPsbtScreen extends StatelessWidget {
break;
}
},
bgColor: context.appColors.onSecondary,
textColor: context.appColors.secondary,
bgColor: context.appColors.secondary,
textColor: context.appColors.onSecondary,
outlined: true,
),
],
Expand All @@ -76,7 +83,7 @@ class ShowPsbtScreen extends StatelessWidget {
BBButton.big(
label: context.loc.psbtFlowDone,
bgColor: context.appColors.secondary,
textColor: context.appColors.onPrimary,
textColor: context.appColors.onSecondary,
onPressed: () {
context.pushNamed(
BroadcastSignedTxRoute.broadcastHome.name,
Expand Down
77 changes: 39 additions & 38 deletions lib/features/send/ui/widgets/selectable_custom_fee_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ class _SelectableCustomFeeListItemState
void _onValueChanged(String text) {
final parsed = num.tryParse(text);
if (parsed != null) {
final fee =
_isAbsolute
? NetworkFee.absolute(parsed.toInt())
: NetworkFee.relative(parsed.toDouble());
final fee = _isAbsolute
? NetworkFee.absolute(parsed.toInt())
: NetworkFee.relative(parsed.toDouble());
setState(() {
_customFee = fee;
});
Expand All @@ -82,32 +81,29 @@ class _SelectableCustomFeeListItemState
final fastestAbsValue = (feeOptions?.fastest.value ?? 0) * txSize;
final economicAbsValue = (feeOptions?.economic.value ?? 0) * txSize;
final slowAbsValue = (feeOptions?.slow.value ?? 0) * txSize;
final customAbsValue =
_customFee == null
? 0
: _customFee is AbsoluteFee
? _customFee!.value
: (_customFee?.value ?? 0) * txSize;
final customAbsValue = _customFee == null
? 0
: _customFee is AbsoluteFee
? _customFee!.value
: (_customFee?.value ?? 0) * txSize;
final fiatEq = ConvertAmount.satsToFiat(
customAbsValue.toInt(),
exchangeRate,
);

final subtitle1 =
_customFee == null || feeOptions == null
? ''
: 'Estimated delivery ~ ${customAbsValue >= fastestAbsValue
? context.loc.sendEstimatedDelivery10Minutes
: customAbsValue >= economicAbsValue
? context.loc.sendEstimatedDelivery10to30Minutes
: customAbsValue >= slowAbsValue
? context.loc.sendEstimatedDeliveryFewHours
: context.loc.sendEstimatedDeliveryHoursToDays}';
final subtitle1 = _customFee == null || feeOptions == null
? ''
: 'Estimated delivery ~ ${customAbsValue >= fastestAbsValue
? context.loc.sendEstimatedDelivery10Minutes
: customAbsValue >= economicAbsValue
? context.loc.sendEstimatedDelivery10to30Minutes
: customAbsValue >= slowAbsValue
? context.loc.sendEstimatedDeliveryFewHours
: context.loc.sendEstimatedDeliveryHoursToDays}';

final subtitle2 =
_customFee == null
? ''
: '${_customFee!.value} ${_isAbsolute ? context.loc.sendSats : context.loc.sendSatsPerVB} = $customAbsValue ${context.loc.sendSats} (~ $fiatEq $fiatCurrencyCode)';
final subtitle2 = _customFee == null
? ''
: '${_customFee!.value} ${_isAbsolute ? context.loc.sendSats : context.loc.sendSatsPerVB} = $customAbsValue ${context.loc.sendSats} (~ $fiatEq $fiatCurrencyCode)';

Future<void> submitCustomFee() async {
await context.read<SendCubit>().customFeesChanged(_customFee!);
Expand Down Expand Up @@ -139,7 +135,10 @@ class _SelectableCustomFeeListItemState
child: Column(
crossAxisAlignment: .stretch,
children: [
BBText(context.loc.sendCustomFee, style: context.font.headlineLarge),
BBText(
context.loc.sendCustomFee,
style: context.font.headlineLarge,
),
if (subtitle1.isNotEmpty) ...[
const Gap(4),
BBText(subtitle1, style: context.font.labelMedium),
Expand All @@ -154,18 +153,19 @@ class _SelectableCustomFeeListItemState
const Gap(8),
Icon(
Icons.radio_button_checked_outlined,
color:
isCustomFeeSelected
? context.appColors.primary
: context.appColors.surface,
color: isCustomFeeSelected
? context.appColors.primary
: context.appColors.surface,
),
],
),
const Gap(12),
Row(
children: [
BBText(
_isAbsolute ? context.loc.sendAbsoluteFees : context.loc.sendRelativeFees,
_isAbsolute
? context.loc.sendAbsoluteFees
: context.loc.sendRelativeFees,
style: context.font.bodySmall,
),
const Spacer(),
Expand All @@ -185,9 +185,9 @@ class _SelectableCustomFeeListItemState
else
AmountInputFormatter(BitcoinUnit.btc.code),
],
style: context.font.bodyLarge,
style: TextStyle(color: context.appColors.onSecondary),
decoration: InputDecoration(
fillColor: context.appColors.onPrimary,
fillColor: context.appColors.secondary,
filled: true,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8.0),
Expand All @@ -210,14 +210,15 @@ class _SelectableCustomFeeListItemState
),
),
contentPadding: const EdgeInsets.symmetric(horizontal: 16.0),
hintText:
_isAbsolute
? context.loc.sendEnterAbsoluteFee
: context.loc.sendEnterRelativeFee,
hintText: _isAbsolute
? context.loc.sendEnterAbsoluteFee
: context.loc.sendEnterRelativeFee,
hintStyle: context.font.bodyMedium?.copyWith(
color: context.appColors.outline,
),
suffixText: _isAbsolute ? context.loc.sendSats : context.loc.sendSatsPerVB,
suffixText: _isAbsolute
? context.loc.sendSats
: context.loc.sendSatsPerVB,
),
onFieldSubmitted: (_) => submitCustomFee(),
onChanged: _onValueChanged,
Expand All @@ -228,7 +229,7 @@ class _SelectableCustomFeeListItemState
label: context.loc.sendConfirmCustomFee,
onPressed: submitCustomFee,
bgColor: context.appColors.secondary,
textColor: context.appColors.onPrimary,
textColor: context.appColors.onSecondary,
),
],
),
Expand Down
Loading
Loading