CAKE-345 | removed isAddReceiverButtonEnabled from send_view_model.dart; fixed height of send card

OleksandrSobol committed Jul 23, 2021 at 09:31 UTC d582f89c7d6e2d0891c04118c946adc0954e3529
3 files changed +4 -8
lib/src/screens/send/send_page.dart
+2 -2
@@ -79,7 +79,7 @@ class SendPage extends BasePage {
79 content: Column(
80 children: <Widget>[
81 Container(
82 - height: 470,
82 + height: sendViewModel.isElectrumWallet ? 470 : 445,
83 child: Observer(
84 builder: (_) {
85 return PageView.builder(
@@ -259,7 +259,7 @@ class SendPage extends BasePage {
259 EdgeInsets.only(left: 24, right: 24, bottom: 24),
260 bottomSection: Column(
261 children: [
262 - if (sendViewModel.isAddReceiverButtonEnabled) Padding(
262 + if (sendViewModel.isElectrumWallet) Padding(
263 padding: EdgeInsets.only(bottom: 12),
264 child: PrimaryButton(
265 onPressed: () {
lib/src/screens/send/widgets/send_card.dart
+1 -1
@@ -80,7 +80,7 @@ class SendCardState extends State<SendCard>
80 )
81 ]),
82 child: Container(
83 - height: 470,
83 + height: sendViewModel.isElectrumWallet ? 470 : 445,
84 decoration: BoxDecoration(
85 borderRadius: BorderRadius.only(
86 bottomLeft: Radius.circular(24),
lib/view_model/send/send_view_model.dart
+1 -5
@@ -44,8 +44,6 @@ abstract class SendViewModelBase with Store {
44
45 sendItemList = ObservableList<SendItem>()
46 ..add(SendItem(_wallet, _settingsStore, _fiatConversationStore));
47 -
48 - isElectrumWallet = _wallet is ElectrumWallet;
47 }
48
49 @observable
@@ -53,8 +51,6 @@ abstract class SendViewModelBase with Store {
51
52 ObservableList<SendItem> sendItemList;
53
56 - bool isElectrumWallet;
57 -
54 @action
55 void addSendItem() {
56 sendItemList.add(SendItem(_wallet, _settingsStore, _fiatConversationStore));
@@ -132,7 +128,7 @@ abstract class SendViewModelBase with Store {
128 ObservableList<Template> get templates => sendTemplateViewModel.templates;
129
130 @computed
135 - bool get isAddReceiverButtonEnabled => _wallet is ElectrumWallet;
131 + bool get isElectrumWallet => _wallet is ElectrumWallet;
132
133 WalletType get walletType => _wallet.type;
134 final WalletBase _wallet;