Skip to content

Commit f926fda

Browse files
authored
Merge pull request #1504 from SatoshiPortal/receive-exact-amount-default
Receive exact amount default true; max toggles it to false
2 parents 6a9ea68 + 07b4742 commit f926fda

3 files changed

Lines changed: 10 additions & 15 deletions

File tree

lib/features/swap/presentation/transfer_state.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ sealed class TransferState with _$TransferState {
2727
@Default(false) bool sendToExternal,
2828
@Default('') String externalAddress,
2929
String? externalAddressError,
30-
@Default(false) bool receiveExactAmount,
30+
@Default(true) bool receiveExactAmount,
3131
@Default('') String amount,
3232
}) = _TransferState;
3333
const TransferState._();

lib/features/swap/ui/widgets/swap_balance_row.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ class SwapBalanceRow extends StatelessWidget {
3535
? maxAmountSat
3636
: ConvertAmount.satsToBtc(maxAmountSat ?? 0);
3737

38-
final receiveExactAmount = context.select(
39-
(TransferBloc bloc) => bloc.state.receiveExactAmount,
40-
);
41-
4238
return Row(
4339
children: [
4440
Text(
@@ -57,8 +53,7 @@ class SwapBalanceRow extends StatelessWidget {
5753
bgColor: context.colour.secondaryFixedDim,
5854
textColor: context.colour.secondary,
5955
textStyle: context.font.labelLarge,
60-
disabled:
61-
receiveExactAmount || maxAmountSat == null || maxAmountSat <= 0,
56+
disabled: maxAmountSat == null || maxAmountSat <= 0,
6257
onPressed: () {
6358
context.read<TransferBloc>().add(
6459
const TransferEvent.receiveExactAmountToggled(false),

pubspec.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,10 @@ packages:
257257
dependency: transitive
258258
description:
259259
name: build_daemon
260-
sha256: "409002f1adeea601018715d613115cfaf0e31f512cb80ae4534c79867ae2363d"
260+
sha256: bf05f6e12cfea92d3c09308d7bcdab1906cd8a179b023269eed00c071004b957
261261
url: "https://pub.dev"
262262
source: hosted
263-
version: "4.1.0"
263+
version: "4.1.1"
264264
build_resolvers:
265265
dependency: transitive
266266
description:
@@ -618,10 +618,10 @@ packages:
618618
dependency: "direct main"
619619
description:
620620
name: file_picker
621-
sha256: f2d9f173c2c14635cc0e9b14c143c49ef30b4934e8d1d274d6206fcb0086a06f
621+
sha256: f8f4ea435f791ab1f817b4e338ed958cb3d04ba43d6736ffc39958d950754967
622622
url: "https://pub.dev"
623623
source: hosted
624-
version: "10.3.3"
624+
version: "10.3.6"
625625
file_selector_linux:
626626
dependency: transitive
627627
description:
@@ -1040,10 +1040,10 @@ packages:
10401040
dependency: transitive
10411041
description:
10421042
name: http
1043-
sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007
1043+
sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412"
10441044
url: "https://pub.dev"
10451045
source: hosted
1046-
version: "1.5.0"
1046+
version: "1.6.0"
10471047
http_multi_server:
10481048
dependency: transitive
10491049
description:
@@ -1080,10 +1080,10 @@ packages:
10801080
dependency: transitive
10811081
description:
10821082
name: image_picker
1083-
sha256: "736eb56a911cf24d1859315ad09ddec0b66104bc41a7f8c5b96b4e2620cf5041"
1083+
sha256: "784210112be18ea55f69d7076e2c656a4e24949fa9e76429fe53af0c0f4fa320"
10841084
url: "https://pub.dev"
10851085
source: hosted
1086-
version: "1.2.0"
1086+
version: "1.2.1"
10871087
image_picker_android:
10881088
dependency: transitive
10891089
description:

0 commit comments

Comments
 (0)