Skip to content

Commit ee12400

Browse files
authored
Merge pull request #1503 from SatoshiPortal/develop
6.3.5
2 parents 37749fa + f926fda commit ee12400

101 files changed

Lines changed: 5569 additions & 1027 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Liquid.svg

Lines changed: 0 additions & 4 deletions
This file was deleted.

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -488,19 +488,19 @@
488488
buildSettings = {
489489
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
490490
CLANG_ENABLE_MODULES = YES;
491-
CURRENT_PROJECT_VERSION = 124;
491+
CURRENT_PROJECT_VERSION = 125;
492492
DEVELOPMENT_TEAM = BX99T32YGS;
493493
ENABLE_BITCODE = NO;
494-
FLUTTER_BUILD_NAME = 6.3.4;
495-
FLUTTER_BUILD_NUMBER = 124;
494+
FLUTTER_BUILD_NAME = 6.3.5;
495+
FLUTTER_BUILD_NUMBER = 125;
496496
INFOPLIST_FILE = Runner/Info.plist;
497497
INFOPLIST_KEY_CFBundleDisplayName = BULL;
498498
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance";
499499
LD_RUNPATH_SEARCH_PATHS = (
500500
"$(inherited)",
501501
"@executable_path/Frameworks",
502502
);
503-
MARKETING_VERSION = 6.3.4;
503+
MARKETING_VERSION = 6.3.5;
504504
PRODUCT_BUNDLE_IDENTIFIER = com.bullbitcoin.app;
505505
PRODUCT_NAME = "$(TARGET_NAME)";
506506
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -678,19 +678,19 @@
678678
buildSettings = {
679679
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
680680
CLANG_ENABLE_MODULES = YES;
681-
CURRENT_PROJECT_VERSION = 124;
681+
CURRENT_PROJECT_VERSION = 125;
682682
DEVELOPMENT_TEAM = BX99T32YGS;
683683
ENABLE_BITCODE = NO;
684-
FLUTTER_BUILD_NAME = 6.3.4;
685-
FLUTTER_BUILD_NUMBER = 124;
684+
FLUTTER_BUILD_NAME = 6.3.5;
685+
FLUTTER_BUILD_NUMBER = 125;
686686
INFOPLIST_FILE = Runner/Info.plist;
687687
INFOPLIST_KEY_CFBundleDisplayName = BULL;
688688
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance";
689689
LD_RUNPATH_SEARCH_PATHS = (
690690
"$(inherited)",
691691
"@executable_path/Frameworks",
692692
);
693-
MARKETING_VERSION = 6.3.4;
693+
MARKETING_VERSION = 6.3.5;
694694
PRODUCT_BUNDLE_IDENTIFIER = com.bullbitcoin.app;
695695
PRODUCT_NAME = "$(TARGET_NAME)";
696696
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -706,19 +706,19 @@
706706
buildSettings = {
707707
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
708708
CLANG_ENABLE_MODULES = YES;
709-
CURRENT_PROJECT_VERSION = 124;
709+
CURRENT_PROJECT_VERSION = 125;
710710
DEVELOPMENT_TEAM = BX99T32YGS;
711711
ENABLE_BITCODE = NO;
712-
FLUTTER_BUILD_NAME = 6.3.4;
713-
FLUTTER_BUILD_NUMBER = 124;
712+
FLUTTER_BUILD_NAME = 6.3.5;
713+
FLUTTER_BUILD_NUMBER = 125;
714714
INFOPLIST_FILE = Runner/Info.plist;
715715
INFOPLIST_KEY_CFBundleDisplayName = BULL;
716716
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.finance";
717717
LD_RUNPATH_SEARCH_PATHS = (
718718
"$(inherited)",
719719
"@executable_path/Frameworks",
720720
);
721-
MARKETING_VERSION = 6.3.4;
721+
MARKETING_VERSION = 6.3.5;
722722
PRODUCT_BUNDLE_IDENTIFIER = com.bullbitcoin.app;
723723
PRODUCT_NAME = "$(TARGET_NAME)";
724724
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

lib/core/swaps/data/datasources/boltz_datasource.dart

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,15 +1053,24 @@ class BoltzDatasource {
10531053
// Invoice settled for reverse swaps
10541054
if (swapModel is LnReceiveSwapModel) {
10551055
log.info(
1056-
'{"swapId": "$swapId", "boltzStatus": "invoiceSettled", "function": "_initializeBoltzWebSocket", "action": "marking_completed", "currentStatus": "${swapModel.status}", "receiveTxid": "${swapModel.receiveTxid}", "timestamp": "${DateTime.now().toIso8601String()}"}',
1057-
);
1058-
updatedSwapModel = swapModel.copyWith(
1059-
status: swap_entity.SwapStatus.completed.name,
1060-
completionTime: DateTime.now().millisecondsSinceEpoch,
1061-
);
1062-
log.info(
1063-
'{"swapId": "$swapId", "boltzStatus": "invoiceSettled", "function": "_initializeBoltzWebSocket", "action": "updated_swap_model", "oldStatus": "${swapModel.status}", "newStatus": "${updatedSwapModel.status}", "timestamp": "${DateTime.now().toIso8601String()}"}',
1056+
'{"swapId": "$swapId", "boltzStatus": "invoiceSettled", "function": "_initializeBoltzWebSocket", "action": "checking_receiveTxid", "currentStatus": "${swapModel.status}", "receiveTxid": "${swapModel.receiveTxid}", "timestamp": "${DateTime.now().toIso8601String()}"}',
10641057
);
1058+
if (swapModel.receiveTxid != null) {
1059+
updatedSwapModel = swapModel.copyWith(
1060+
status: swap_entity.SwapStatus.completed.name,
1061+
completionTime: DateTime.now().millisecondsSinceEpoch,
1062+
);
1063+
log.info(
1064+
'{"swapId": "$swapId", "boltzStatus": "invoiceSettled", "function": "_initializeBoltzWebSocket", "action": "updated_swap_model_completed", "oldStatus": "${swapModel.status}", "newStatus": "${updatedSwapModel.status}", "receiveTxid": "${swapModel.receiveTxid}", "timestamp": "${DateTime.now().toIso8601String()}"}',
1065+
);
1066+
} else {
1067+
updatedSwapModel = swapModel.copyWith(
1068+
status: swap_entity.SwapStatus.claimable.name,
1069+
);
1070+
log.info(
1071+
'{"swapId": "$swapId", "boltzStatus": "invoiceSettled", "function": "_initializeBoltzWebSocket", "action": "updated_swap_model_claimable", "oldStatus": "${swapModel.status}", "newStatus": "${updatedSwapModel.status}", "receiveTxid": null, "timestamp": "${DateTime.now().toIso8601String()}"}',
1072+
);
1073+
}
10651074
}
10661075

10671076
case SwapStatus.invoiceFailedToPay:

lib/features/app_startup/ui/app_startup_widget.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:bb_mobile/core/seed/data/datasources/seed_datasource.dart';
22
import 'package:bb_mobile/core/themes/app_theme.dart';
3+
import 'package:bb_mobile/core/utils/build_context_x.dart';
34
import 'package:bb_mobile/core/utils/constants.dart';
45
import 'package:bb_mobile/core/widgets/buttons/button.dart';
56
import 'package:bb_mobile/core/widgets/share_logs_widget.dart';
@@ -116,7 +117,7 @@ class AppStartupFailureScreen extends StatelessWidget {
116117
Icon(Icons.error_outline, color: context.colour.error),
117118
const Gap(8),
118119
Text(
119-
'Startup Error',
120+
context.loc.appStartupErrorTitle,
120121
style: context.font.headlineLarge?.copyWith(
121122
color: context.colour.error,
122123
),
@@ -128,8 +129,8 @@ class AppStartupFailureScreen extends StatelessWidget {
128129
child: Text(
129130
e is SeedNotFoundException
130131
? hasBackup
131-
? 'On v5.4.0 a critical bug was discovered in one of our dependencies which affect private key storage. Your app has been affected by this. You will have to delete this app and reinstall it with your backed up seed.'
132-
: 'On v5.4.0 a critical bug was discovered in one of our dependencies which affect private key storage. Your app has been affected by this. Contact our support team.'
132+
? context.loc.appStartupErrorMessageWithBackup
133+
: context.loc.appStartupErrorMessageNoBackup
133134
: e.toString(),
134135
style: context.font.bodyMedium?.copyWith(
135136
color: context.colour.secondary.withValues(alpha: 0.7),
@@ -144,7 +145,7 @@ class AppStartupFailureScreen extends StatelessWidget {
144145
// ignore: deprecated_member_use
145146
launchUrl(url, mode: LaunchMode.externalApplication);
146147
},
147-
label: 'Contact Support',
148+
label: context.loc.appStartupContactSupportButton,
148149
bgColor: context.colour.primary,
149150
textColor: context.colour.onPrimary,
150151
),

lib/features/app_unlock/ui/pin_code_unlock_screen.dart

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:bb_mobile/core/themes/app_theme.dart';
2+
import 'package:bb_mobile/core/utils/build_context_x.dart';
23
import 'package:bb_mobile/core/widgets/buttons/button.dart';
34
import 'package:bb_mobile/core/widgets/dialpad/dial_pad.dart';
45
import 'package:bb_mobile/core/widgets/inputs/text_input.dart';
@@ -60,7 +61,7 @@ class PinCodeUnlockInputScreen extends StatelessWidget {
6061
automaticallyImplyLeading: false,
6162
flexibleSpace: TopBar(
6263
onBack: canPop ? () => context.pop() : null,
63-
title: "Authentication",
64+
title: context.loc.appUnlockScreenTitle,
6465
),
6566
),
6667
body: SafeArea(
@@ -75,7 +76,7 @@ class PinCodeUnlockInputScreen extends StatelessWidget {
7576
children: [
7677
const Gap(30),
7778
Text(
78-
'Enter your pin code to unlock',
79+
context.loc.appUnlockEnterPinMessage,
7980
textAlign: TextAlign.center,
8081
style: context.font.headlineMedium?.copyWith(
8182
color: context.colour.outline,
@@ -107,7 +108,12 @@ class PinCodeUnlockInputScreen extends StatelessWidget {
107108
final (showError, failedAttempts) = data;
108109
return showError && failedAttempts > 0
109110
? Text(
110-
'Incorrect PIN. Please try again. ($failedAttempts failed ${failedAttempts == 1 ? "attempt" : "attempts"})',
111+
context.loc.appUnlockIncorrectPinError(
112+
failedAttempts,
113+
failedAttempts == 1
114+
? context.loc.appUnlockAttemptSingular
115+
: context.loc.appUnlockAttemptPlural,
116+
),
111117
textAlign: TextAlign.start,
112118
style: context.font.labelSmall?.copyWith(
113119
color: context.colour.error,
@@ -153,7 +159,7 @@ class PinCodeUnlockInputScreen extends StatelessWidget {
153159
selector: (state) => state.canSubmit,
154160
builder: (context, canSubmit) {
155161
return BBButton.big(
156-
label: 'Unlock',
162+
label: context.loc.appUnlockButton,
157163
textStyle: context.font.headlineLarge,
158164
disabled: !canSubmit,
159165
bgColor:

lib/features/ark/ui/ark_about_page.dart

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:bb_mobile/core/ark/ark.dart';
22
import 'package:bb_mobile/core/themes/app_theme.dart';
3+
import 'package:bb_mobile/core/utils/build_context_x.dart';
34
import 'package:bb_mobile/core/widgets/navbar/top_bar.dart';
45
import 'package:bb_mobile/core/widgets/text/text.dart';
56
import 'package:bb_mobile/features/ark/presentation/cubit.dart';
@@ -20,64 +21,64 @@ class ArkAboutPage extends StatelessWidget {
2021

2122
return Scaffold(
2223
appBar: AppBar(
23-
flexibleSpace: TopBar(title: 'About', onBack: () => context.pop()),
24+
flexibleSpace: TopBar(title: context.loc.arkAboutTitle, onBack: () => context.pop()),
2425
),
2526
body: SafeArea(
2627
child: ListView(
2728
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 24),
2829
children: [
29-
const _CopyField(label: 'Server URL', value: Ark.server),
30+
_CopyField(label: context.loc.arkAboutServerUrl, value: Ark.server),
3031
const SizedBox(height: 18),
31-
_SecretKeyField(label: 'Secret Key', value: wallet.secretHex),
32+
_SecretKeyField(label: context.loc.arkAboutSecretKey, value: wallet.secretHex),
3233
const SizedBox(height: 18),
33-
_CopyField(label: 'Server pubkey', value: serverInfo.signerPubkey),
34+
_CopyField(label: context.loc.arkAboutServerPubkey, value: serverInfo.signerPubkey),
3435
const SizedBox(height: 18),
3536
_CopyField(
36-
label: 'Forfeit address',
37+
label: context.loc.arkAboutForfeitAddress,
3738
value: serverInfo.forfeitAddress,
3839
),
3940
const SizedBox(height: 18),
40-
const _InfoField(label: 'Network', value: Ark.network),
41+
_InfoField(label: context.loc.arkAboutNetwork, value: Ark.network),
4142
const SizedBox(height: 18),
42-
_InfoField(label: 'Dust', value: '${serverInfo.dust} SATS'),
43+
_InfoField(label: context.loc.arkAboutDust, value: context.loc.arkAboutDustValue(serverInfo.dust)),
4344
const SizedBox(height: 18),
4445
_InfoField(
45-
label: 'Session duration',
46-
value: _formatDuration(serverInfo.sessionDuration),
46+
label: context.loc.arkAboutSessionDuration,
47+
value: _formatDuration(context, serverInfo.sessionDuration),
4748
),
4849
const SizedBox(height: 18),
4950
_InfoField(
50-
label: 'Boarding exit delay',
51-
value: _formatDuration(serverInfo.boardingExitDelay),
51+
label: context.loc.arkAboutBoardingExitDelay,
52+
value: _formatDuration(context, serverInfo.boardingExitDelay),
5253
),
5354
const SizedBox(height: 18),
5455
_InfoField(
55-
label: 'Unilateral exit delay',
56-
value: _formatDuration(serverInfo.unilateralExitDelay),
56+
label: context.loc.arkAboutUnilateralExitDelay,
57+
value: _formatDuration(context, serverInfo.unilateralExitDelay),
5758
),
5859
const SizedBox(height: 18),
59-
const _CopyField(label: 'Esplora URL', value: Ark.esplora),
60+
_CopyField(label: context.loc.arkAboutEsploraUrl, value: Ark.esplora),
6061
],
6162
),
6263
),
6364
);
6465
}
6566

66-
static String _formatDuration(dynamic seconds) {
67+
static String _formatDuration(BuildContext context, dynamic seconds) {
6768
if (seconds == null) return 'N/A';
6869
final int secs = seconds is int ? seconds : (seconds as BigInt).toInt();
6970

7071
if (secs < 60) {
71-
return '$secs seconds';
72+
return context.loc.arkAboutDurationSeconds(secs);
7273
} else if (secs < 3600) {
7374
final minutes = (secs / 60).round();
74-
return '$minutes ${minutes == 1 ? 'minute' : 'minutes'}';
75+
return minutes == 1 ? context.loc.arkAboutDurationMinute(minutes) : context.loc.arkAboutDurationMinutes(minutes);
7576
} else if (secs < 86400) {
7677
final hours = (secs / 3600).round();
77-
return '$hours ${hours == 1 ? 'hour' : 'hours'}';
78+
return hours == 1 ? context.loc.arkAboutDurationHour(hours) : context.loc.arkAboutDurationHours(hours);
7879
} else {
7980
final days = (secs / 86400).round();
80-
return '$days ${days == 1 ? 'day' : 'days'}';
81+
return days == 1 ? context.loc.arkAboutDurationDay(days) : context.loc.arkAboutDurationDays(days);
8182
}
8283
}
8384
}
@@ -110,18 +111,24 @@ class _InfoField extends StatelessWidget {
110111
}
111112
}
112113

113-
class _CopyField extends StatelessWidget {
114+
class _CopyField extends StatefulWidget {
114115
final String label;
115116
final String value;
116117
const _CopyField({required this.label, required this.value});
117118

119+
@override
120+
State<_CopyField> createState() => _CopyFieldState();
121+
}
122+
123+
class _CopyFieldState extends State<_CopyField> {
124+
118125
@override
119126
Widget build(BuildContext context) {
120127
return Column(
121128
crossAxisAlignment: CrossAxisAlignment.start,
122129
children: [
123130
BBText(
124-
label,
131+
widget.label,
125132
style: context.font.bodyLarge?.copyWith(
126133
color: context.colour.surfaceContainer,
127134
),
@@ -132,18 +139,18 @@ class _CopyField extends StatelessWidget {
132139
runSpacing: 4,
133140
children: [
134141
BBText(
135-
value,
142+
widget.value,
136143
style: context.font.bodyMedium?.copyWith(
137144
color: context.colour.outline,
138145
),
139146
),
140147

141148
InkWell(
142149
onTap: () {
143-
Clipboard.setData(ClipboardData(text: value));
150+
Clipboard.setData(ClipboardData(text: widget.value));
144151
ScaffoldMessenger.of(context).showSnackBar(
145152
SnackBar(
146-
content: Text('$label copied to clipboard'),
153+
content: Text(context.loc.arkAboutCopiedMessage(widget.label)),
147154
duration: const Duration(seconds: 2),
148155
),
149156
);
@@ -152,7 +159,7 @@ class _CopyField extends StatelessWidget {
152159
mainAxisSize: MainAxisSize.min,
153160
children: [
154161
BBText(
155-
'Copy',
162+
context.loc.arkAboutCopy,
156163
style: context.font.bodyMedium?.copyWith(
157164
color: context.colour.primary,
158165
fontSize: 14,
@@ -215,7 +222,7 @@ class _SecretKeyFieldState extends State<_SecretKeyField> {
215222
mainAxisSize: MainAxisSize.min,
216223
children: [
217224
BBText(
218-
_isVisible ? 'Hide' : 'Show',
225+
_isVisible ? context.loc.arkAboutHide : context.loc.arkAboutShow,
219226
style: context.font.bodyMedium?.copyWith(
220227
color: context.colour.primary,
221228
fontSize: 14,
@@ -235,7 +242,7 @@ class _SecretKeyFieldState extends State<_SecretKeyField> {
235242
Clipboard.setData(ClipboardData(text: widget.value));
236243
ScaffoldMessenger.of(context).showSnackBar(
237244
SnackBar(
238-
content: Text('${widget.label} copied to clipboard'),
245+
content: Text(context.loc.arkAboutCopiedMessage(widget.label)),
239246
duration: const Duration(seconds: 2),
240247
),
241248
);
@@ -244,7 +251,7 @@ class _SecretKeyFieldState extends State<_SecretKeyField> {
244251
mainAxisSize: MainAxisSize.min,
245252
children: [
246253
BBText(
247-
'Copy',
254+
context.loc.arkAboutCopy,
248255
style: context.font.bodyMedium?.copyWith(
249256
color: context.colour.primary,
250257
fontSize: 14,

0 commit comments

Comments
 (0)