formatting

This commit is contained in:
Serhii 2023-01-16 17:31:31 +02:00
parent b4249f21a9
commit 4636aacae7

View file

@ -18,8 +18,7 @@ import 'package:cake_wallet/generated/i18n.dart';
part 'exchange_trade_view_model.g.dart'; part 'exchange_trade_view_model.g.dart';
class ExchangeTradeViewModel = ExchangeTradeViewModelBase class ExchangeTradeViewModel = ExchangeTradeViewModelBase with _$ExchangeTradeViewModel;
with _$ExchangeTradeViewModel;
abstract class ExchangeTradeViewModelBase with Store { abstract class ExchangeTradeViewModelBase with Store {
ExchangeTradeViewModelBase( ExchangeTradeViewModelBase(
@ -73,16 +72,14 @@ abstract class ExchangeTradeViewModelBase with Store {
: ''; : '';
@computed @computed
String get pendingTransactionFiatAmountValueFormatted => String get pendingTransactionFiatAmountValueFormatted => sendViewModel.isFiatDisabled
sendViewModel.isFiatDisabled ? ''
? '' : sendViewModel.pendingTransactionFiatAmount : sendViewModel.pendingTransactionFiatAmount + ' ' + sendViewModel.fiat.title;
+ ' ' + sendViewModel.fiat.title;
@computed @computed
String get pendingTransactionFeeFiatAmountFormatted => String get pendingTransactionFeeFiatAmountFormatted => sendViewModel.isFiatDisabled
sendViewModel.isFiatDisabled ? ''
? '' : sendViewModel.pendingTransactionFeeFiatAmount : sendViewModel.pendingTransactionFeeFiatAmount + ' ' + sendViewModel.fiat.title;
+ ' ' + sendViewModel.fiat.title;
@observable @observable
ObservableList<ExchangeTradeItem> items; ObservableList<ExchangeTradeItem> items;
@ -133,15 +130,12 @@ abstract class ExchangeTradeViewModelBase with Store {
? S.current.memo ? S.current.memo
: S.current.extra_id; : S.current.extra_id;
items.add(ExchangeTradeItem( items.add(ExchangeTradeItem(title: title, data: '${trade.extraId}', isCopied: false));
title: title, data: '${trade.extraId}', isCopied: false));
} }
items.addAll([ items.addAll([
ExchangeTradeItem( ExchangeTradeItem(title: S.current.amount, data: '${trade.amount}', isCopied: false),
title: S.current.amount, data: '${trade.amount}', isCopied: false), ExchangeTradeItem(title: S.current.status, data: '${trade.state}', isCopied: false),
ExchangeTradeItem(
title: S.current.status, data: '${trade.state}', isCopied: false),
ExchangeTradeItem( ExchangeTradeItem(
title: S.current.send_to_this_address('${trade.from} ${trade.from.tag ?? ''}') + ':', title: S.current.send_to_this_address('${trade.from} ${trade.from.tag ?? ''}') + ':',
data: trade.inputAddress ?? '', data: trade.inputAddress ?? '',