From 1d3e4f4331e16f8f83ca89ed87427d3d5cb4abbb Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Tue, 25 Jan 2022 15:43:19 +0100 Subject: [PATCH] filter templates by current wallet type --- lib/src/screens/send/send_page.dart | 2 +- lib/view_model/send/send_view_model.dart | 31 +++++++++++++----------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/lib/src/screens/send/send_page.dart b/lib/src/screens/send/send_page.dart index cdf7de566..81ff73d57 100644 --- a/lib/src/screens/send/send_page.dart +++ b/lib/src/screens/send/send_page.dart @@ -197,7 +197,7 @@ class SendPage extends BasePage { itemCount: itemCount, itemBuilder: (context, index) { final template = templates[index]; - + print(template.cryptoCurrency); return TemplateTile( key: UniqueKey(), to: template.name, diff --git a/lib/view_model/send/send_view_model.dart b/lib/view_model/send/send_view_model.dart index 9de6eefc8..d3891fbfd 100644 --- a/lib/view_model/send/send_view_model.dart +++ b/lib/view_model/send/send_view_model.dart @@ -29,8 +29,11 @@ part 'send_view_model.g.dart'; class SendViewModel = SendViewModelBase with _$SendViewModel; abstract class SendViewModelBase with Store { - SendViewModelBase(this._wallet, this._settingsStore, - this.sendTemplateViewModel, this._fiatConversationStore, + SendViewModelBase( + this._wallet, + this._settingsStore, + this.sendTemplateViewModel, + this._fiatConversationStore, this.transactionDescriptionBox) : state = InitialExecutionState() { final priority = _settingsStore.priority[_wallet.type]; @@ -127,15 +130,18 @@ abstract class SendViewModelBase with Store { bool get isReadyForSend => _wallet.syncStatus is SyncedSyncStatus; @computed - ObservableList