mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-02 12:14:09 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user