From d582f89c7d6e2d0891c04118c946adc0954e3529 Mon Sep 17 00:00:00 2001 From: OleksandrSobol Date: Fri, 23 Jul 2021 09:31:35 +0300 Subject: [PATCH] CAKE-345 | removed isAddReceiverButtonEnabled from send_view_model.dart; fixed height of send card --- lib/src/screens/send/send_page.dart | 4 ++-- lib/src/screens/send/widgets/send_card.dart | 2 +- lib/view_model/send/send_view_model.dart | 6 +----- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/src/screens/send/send_page.dart b/lib/src/screens/send/send_page.dart index acd217b3a..a88c01b6e 100644 --- a/lib/src/screens/send/send_page.dart +++ b/lib/src/screens/send/send_page.dart @@ -79,7 +79,7 @@ class SendPage extends BasePage { content: Column( children: [ Container( - height: 470, + height: sendViewModel.isElectrumWallet ? 470 : 445, child: Observer( builder: (_) { return PageView.builder( @@ -259,7 +259,7 @@ class SendPage extends BasePage { EdgeInsets.only(left: 24, right: 24, bottom: 24), bottomSection: Column( children: [ - if (sendViewModel.isAddReceiverButtonEnabled) Padding( + if (sendViewModel.isElectrumWallet) Padding( padding: EdgeInsets.only(bottom: 12), child: PrimaryButton( onPressed: () { diff --git a/lib/src/screens/send/widgets/send_card.dart b/lib/src/screens/send/widgets/send_card.dart index 67884ce29..f0e0b6e70 100644 --- a/lib/src/screens/send/widgets/send_card.dart +++ b/lib/src/screens/send/widgets/send_card.dart @@ -80,7 +80,7 @@ class SendCardState extends State ) ]), child: Container( - height: 470, + height: sendViewModel.isElectrumWallet ? 470 : 445, decoration: BoxDecoration( borderRadius: BorderRadius.only( bottomLeft: Radius.circular(24), diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart index a4dda362d..6d3ec9109 100644 --- a/lib/view_model/send/send_view_model.dart +++ b/lib/view_model/send/send_view_model.dart @@ -44,8 +44,6 @@ abstract class SendViewModelBase with Store { sendItemList = ObservableList() ..add(SendItem(_wallet, _settingsStore, _fiatConversationStore)); - - isElectrumWallet = _wallet is ElectrumWallet; } @observable @@ -53,8 +51,6 @@ abstract class SendViewModelBase with Store { ObservableList sendItemList; - bool isElectrumWallet; - @action void addSendItem() { sendItemList.add(SendItem(_wallet, _settingsStore, _fiatConversationStore)); @@ -132,7 +128,7 @@ abstract class SendViewModelBase with Store { ObservableList