Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Hide position details on stable screen on non-stable positions #1189

Merged
merged 1 commit into from
Sep 1, 2023
Merged
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
5 changes: 2 additions & 3 deletions mobile/lib/features/stable/stable_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:get_10101/common/fiat_text.dart';
import 'package:get_10101/features/stable/bitcoinize_confirmation_sheet.dart';
import 'package:get_10101/features/stable/stable_confirmation_sheet.dart';
import 'package:get_10101/features/trade/domain/direction.dart';
import 'package:get_10101/features/trade/position_change_notifier.dart';
import 'package:provider/provider.dart';

Expand Down Expand Up @@ -46,13 +45,13 @@ class _StableScreenState extends State<StableScreen> {
]),
)
];
} else if (position.direction == Direction.long) {
} else if (!positionChangeNotifier.hasStableUSD()) {
widgets = [
const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Flexible(
child: Text("Please close your long position before stabilizing your bitcoin!",
child: Text("Please close your current position before stabilizing your bitcoin!",
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(color: Colors.grey, fontSize: 16)),
Expand Down