Skip to content

Commit aa44a29

Browse files
committed
fixup! feat: Shoehorn channel-opening flow into first trade flow
- Just minor things that I've noticed broke the ui on the ios simulator. - Pop the last dialog when the confirming the trade from the channel configurator.
1 parent 5c78048 commit aa44a29

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Diff for: mobile/lib/features/trade/channel_configuration.dart

+10-10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'package:get_10101/common/application/lsp_change_notifier.dart';
66
import 'package:get_10101/common/domain/model.dart';
77
import 'package:get_10101/common/value_data_row.dart';
88
import 'package:get_10101/features/trade/domain/channel_opening_params.dart';
9+
import 'package:go_router/go_router.dart';
910
import 'package:provider/provider.dart';
1011
import 'package:slide_to_confirm/slide_to_confirm.dart';
1112

@@ -45,7 +46,7 @@ channelConfiguration({
4546
},
4647
child: SingleChildScrollView(
4748
child: SizedBox(
48-
height: 425,
49+
height: 455,
4950
child: ChannelConfiguration(
5051
marginTrader: marginTrader,
5152
orderMatchingFee: orderMatchingFee,
@@ -127,7 +128,7 @@ class _ChannelConfiguration extends State<ChannelConfiguration> {
127128
return Form(
128129
key: _formKey,
129130
child: Container(
130-
padding: const EdgeInsets.all(20),
131+
padding: const EdgeInsets.only(top: 20, left: 20, right: 20),
131132
child: Column(children: [
132133
const Text("DLC Channel Configuration",
133134
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 17)),
@@ -237,9 +238,7 @@ class _ChannelConfiguration extends State<ChannelConfiguration> {
237238
"DLC channel with you, creating your position in the process.",
238239
style: DefaultTextStyle.of(context).style,
239240
)),
240-
const SizedBox(
241-
height: 10,
242-
),
241+
const SizedBox(height: 40),
243242
// FIXME: The slider is disabled by default, even if the default values are okay.
244243
AbsorbPointer(
245244
absorbing: _formKey.currentState != null
@@ -252,11 +251,12 @@ class _ChannelConfiguration extends State<ChannelConfiguration> {
252251
color: Colors.white,
253252
size: 20,
254253
),
255-
onConfirmation: () => {
256-
widget.onConfirmation(ChannelOpeningParams(
257-
coordinatorReserve: counterpartyReserve,
258-
traderReserve: ownReserve))
259-
}))
254+
onConfirmation: () {
255+
GoRouter.of(context).pop();
256+
widget.onConfirmation(ChannelOpeningParams(
257+
coordinatorReserve: counterpartyReserve,
258+
traderReserve: ownReserve));
259+
}))
260260
],
261261
),
262262
),

Diff for: mobile/lib/features/trade/trade_bottom_sheet_confirmation.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ tradeBottomSheetConfirmation(
6161
},
6262
child: SingleChildScrollView(
6363
child: SizedBox(
64-
height: 350,
64+
height: 380,
6565
child: TradeBottomSheetConfirmation(
6666
direction: direction,
6767
sliderButtonKey: sliderButtonKey,

0 commit comments

Comments
 (0)