Cw 433 support send templates with multiple recipients (#995)

* feat: Support Send templates with multiple recipients

* feat: use only first name for template display, and sum total amount

* fix: amounts being wiped

* feat: make send template card buttons function like send card

* feat: replace amount -> name for template name

* fix: template name
This commit is contained in:
Rafael Saes
2023-08-02 01:19:04 +03:00
committed by GitHub
parent c68baf7244
commit fcf4fbdc14
33 changed files with 716 additions and 439 deletions
+14 -9
View File
@@ -4,14 +4,15 @@ part 'template.g.dart';
@HiveType(typeId: Template.typeId)
class Template extends HiveObject {
Template({
required this.nameRaw,
required this.isCurrencySelectedRaw,
required this.addressRaw,
required this.cryptoCurrencyRaw,
required this.amountRaw,
required this.fiatCurrencyRaw,
required this.amountFiatRaw});
Template(
{required this.nameRaw,
required this.isCurrencySelectedRaw,
required this.addressRaw,
required this.cryptoCurrencyRaw,
required this.amountRaw,
required this.fiatCurrencyRaw,
required this.amountFiatRaw,
this.additionalRecipientsRaw});
static const typeId = 6;
static const boxName = 'Template';
@@ -37,6 +38,9 @@ class Template extends HiveObject {
@HiveField(6)
String? amountFiatRaw;
@HiveField(7)
List<Template>? additionalRecipientsRaw;
bool get isCurrencySelected => isCurrencySelectedRaw ?? false;
String get fiatCurrency => fiatCurrencyRaw ?? '';
@@ -50,5 +54,6 @@ class Template extends HiveObject {
String get cryptoCurrency => cryptoCurrencyRaw ?? '';
String get amount => amountRaw ?? '';
}
List<Template>? get additionalRecipients => additionalRecipientsRaw ?? null;
}